Skip to content

Commit

Permalink
chore(e2e): fix e2e tests after puppeteer env update
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Feb 19, 2024
1 parent 09ee2d4 commit 01ee863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/setup/image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'expect-puppeteer';
// import 'expect-puppeteer';
import {toMatchImageSnapshot} from 'jest-image-snapshot';

expect.extend({toMatchImageSnapshot});
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: 1, failureThresholdType: 'percent', ...DIFF_CONFIG});
expect(image).toMatchImageSnapshot({failureThreshold: 0.25, failureThresholdType: 'percent', ...DIFF_CONFIG});
});

0 comments on commit 01ee863

Please sign in to comment.