Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Feb 19, 2024
2 parents 683b896 + 01ee863 commit 2a25fb2
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 351 deletions.
4 changes: 2 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@types/jest-image-snapshot": "^6.4.0",
"@types/puppeteer": "^7.0.4",
"jest-image-snapshot": "^6.4.0",
"jest-puppeteer": "^9.0.2",
"puppeteer": "^22.0.0",
"jest-puppeteer": "^10.0.1",
"puppeteer": "^22.1.0",
"stucumber": "^0.19.0"
}
}
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});
});
Loading

0 comments on commit 2a25fb2

Please sign in to comment.