Category

Visual Regression

Fixing flaky Playwright visual regression tests

We utilise visual regression tests in our pipelines to give us confidence that the code we’re about to ship hasn’t unexpectedly changed anything visually. We achieve this by using Playwright’s screenshot functionality to capture the page and upload it to [Percy](https://percy.io/). We opted for Percy instead of Playwright’s built in [visual comparisons](https://playwright.dev/docs/test-snapshots) because we like having a simple and intuitive UI to review the difference. If there’s a difference between the screenshot on `main` and our proposed changes, we get a view like this which we can review and approve if we’re happy: