Skip to content

Commit

Permalink
chore(e2e): fix accuracy of screen check
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Feb 16, 2024
1 parent f2e43d1 commit 60bb6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/setup/scenarios.screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ cucumber.defineRule('check if the screenshot is exactly equal to the snapshoted
cucumber.defineRule('check if the screenshot is equal to the snapshoted version', (world: TestEnv) => {
if (!world.screenshots.length) throw new Error('E2E: there is no any screenshot, make sure you have "Take a screenshot" before');
const image = world.screenshots.pop();
expect(image).toMatchImageSnapshot({failureThreshold: 5, failureThresholdType: 'pixel', ...DIFF_CONFIG});
expect(image).toMatchImageSnapshot({failureThreshold: 1, failureThresholdType: 'percent', ...DIFF_CONFIG});
});

0 comments on commit 60bb6ac

Please sign in to comment.