To run the visual regression tests follow the steps below:
- Bootstrap the project with
npm ciandnpm run build - Run
npm run start:container - Build the mock website
npm run build:e2e - Start the local server with
npm run start:visual-preview - Run the visual regression tests with
npm run test:visual
If you need to update the screenshots run npm run test:visual -- --update-snapshots
If you're using Apple silicon and get an error with ESBuild run npm i vite --force --no-save inside the Docker container after step 2 to fix it