From c96fcb72714e3a712dc34f253fc0499b1c1dbe8d Mon Sep 17 00:00:00 2001 From: Manos Konstantinidis Date: Wed, 3 Nov 2021 13:48:39 +0200 Subject: [PATCH] fix: Generate report with diff screenshots (not latest) (#47) --- lib/report.test.ts | 2 +- lib/report.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/report.test.ts b/lib/report.test.ts index e35b3423..35cec439 100644 --- a/lib/report.test.ts +++ b/lib/report.test.ts @@ -43,7 +43,7 @@ describe('report.ts', () => { await generateReport(logger, 'ios'); expect(readdirMock).toHaveBeenCalledWith( - '/Users/johndoe/Projects/my-project/.owl/latest/ios' + '/Users/johndoe/Projects/my-project/.owl/diff/ios' ); expect(handlebarsCompileMock).toHaveBeenCalledTimes(1); expect(writeFileMock).toHaveBeenCalledWith( diff --git a/lib/report.ts b/lib/report.ts index ba61a79b..b7796f5b 100644 --- a/lib/report.ts +++ b/lib/report.ts @@ -8,8 +8,8 @@ import { Platform } from './types'; export const generateReport = async (logger: Logger, platform: Platform) => { const cwd = process.cwd(); const reportDirPath = path.join(cwd, '.owl', 'report'); - const screenshotsDirPath = path.join(cwd, '.owl', 'latest', platform); - const screenshots = await fs.readdir(screenshotsDirPath); + const diffScreenshotsDirPath = path.join(cwd, '.owl', 'diff', platform); + const screenshots = await fs.readdir(diffScreenshotsDirPath); logger.info(`[OWL] Generating Report`);