Skip to content

Commit

Permalink
style(e2e): apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Yuliya Adamska <[email protected]>
  • Loading branch information
ala-n and yadamskaya committed Feb 15, 2024
1 parent b9fb410 commit 22fea15
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/reporters/printers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const printSummary = (stats) => {
const resolveURL = (basePath, snapshot) => {
if (!basePath) return snapshot;
let path = basePath + (basePath.endsWith('/') ? '' : '/') + snapshot;
if (basePath.includes('github')) path+= '?raw=true';
if (basePath.includes('github')) path += '?raw=true';
return path.replace(/\\/g, '/');
};

Expand Down
2 changes: 1 addition & 1 deletion e2e/reporters/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SnapshotAwareReporter {
if (status === 'passed') return statBase;

const snapshotParts = [filename, ...ancestorTitles, title, '1-snap', 'diff'];
const snapshotName = snapshotParts.map(sanitize).join('-') + '.png'
const snapshotName = snapshotParts.map(sanitize).join('-') + '.png';
const snapshotPath = path.join(this._options.diffDir, snapshotName);
const snapshotExists = fs.existsSync(snapshotPath);

Expand Down
2 changes: 1 addition & 1 deletion e2e/setup/scenarios.screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {TestEnv} from './scenarious.world';
import type {MatchImageSnapshotOptions} from 'jest-image-snapshot';

const DIFF_CONFIG: MatchImageSnapshotOptions = {
customDiffDir: '.diff',
customDiffDir: '.diff'
};

cucumber.defineRule('take a screenshot', async (world: TestEnv) => {
Expand Down

0 comments on commit 22fea15

Please sign in to comment.