From 60bb6ac2f43dcedd441f7e595ba2a296d30fe99b Mon Sep 17 00:00:00 2001 From: "ala'n (Alexey Stsefanovich)" Date: Fri, 16 Feb 2024 16:34:58 +0100 Subject: [PATCH] chore(e2e): fix accuracy of screen check --- e2e/setup/scenarios.screenshot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/setup/scenarios.screenshot.ts b/e2e/setup/scenarios.screenshot.ts index 931325f31..1800329c7 100644 --- a/e2e/setup/scenarios.screenshot.ts +++ b/e2e/setup/scenarios.screenshot.ts @@ -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}); });