Note: We run visual tests inside docker container because we need to have screenshots from linux
This guide explains how to run visual tests in Playwright using npm scripts. The scripts we will cover are:
test:visual
: runs visual tests.test:visual:update
: updates existing snapshots.
Ensure you have docker
/app
├── /playwright
│ ├── Dockerfile
│ └── docker-compose.yml
└── ...
yarn tests:visual
yarn tests:visual:update