Playwright toHaveScreenshot() default settings miss many small visual changes
A developer tested how Playwright's toHaveScreenshot() behaves with its default options by building a small card UI and applying eleven minor changes to it. Each change was compared against a baseline under five different option sets, including threshold and pixel-count limits. The results showed that the option names do not always match what they actually let through. The test used Playwright 1.63.0 with Chromium on Linux, served from a local server with a fixed font and viewport to keep the setup controlled. The findings suggest that a visual test with default settings can pass changes that a reader would expect it to catch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in