From 29767f638612d07106e48ce1c53d72f042115a38 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..e0e04eaa3 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.05, + }, + }, use: { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: "on-first-retry",