From e5d100e79becf2e06f4784aded8f2a95793fca91 Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:22:05 +0200 Subject: [PATCH] chore: relax snapshot comparison --- playwright-ct.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/playwright-ct.config.ts b/playwright-ct.config.ts index 46885d42f..347491d24 100644 --- a/playwright-ct.config.ts +++ b/playwright-ct.config.ts @@ -23,6 +23,16 @@ export default defineConfig({ /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + expect: { + /** + * Maximum time expect() should wait for the condition to be met. + * For example in `await expect(locator).toHaveText();` + */ + timeout: 5000, + toHaveScreenshot: { + maxDiffPixelRatio: 0.02, + }, + }, use: { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: "on-first-retry",