Skip to content

Commit

Permalink
Reduce threshold for color matching in VRT
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Nov 25, 2024
1 parent 380eb31 commit 84eec43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions frontend/test/playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ const config: PlaywrightTestConfig = {
* to avoid the test also becoming a load test.
*/
workers: UPDATE_TAPES === "true" || baseURL !== localBaseURL ? 1 : undefined,
expect: {
toMatchSnapshot: {
threshold: 0.1,
},
},
}

export default config
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ for (const contentPage of contentPages) {
await expectSnapshot(page, contentPage, page, {
dir,
screenshotOptions: { fullPage: true },
snapshotOptions: { maxDiffPixelRatio: 0.01 },
})
})
})
Expand Down Expand Up @@ -100,8 +99,7 @@ test.describe("layout color is set correctly", () => {
await page.mouse.move(100, 100)

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(
"about-ltr-lg-light.png",
{ maxDiffPixelRatio: 0.01 }
"about-ltr-lg-light.png"
)
})
})
Expand Down

0 comments on commit 84eec43

Please sign in to comment.