Add screenshot tests

This commit is contained in:
Przemek Więch
2026-05-08 20:24:28 +02:00
parent ac26e6c3cb
commit 29ae67427a
23 changed files with 456 additions and 17 deletions

View File

@@ -12,13 +12,29 @@ export default defineConfig({
locale: 'en-US', // Forces consistent translation keys across locales for robust placeholder selectors
trace: 'on-first-retry',
},
expect: {
toHaveScreenshot: {
maxDiffPixelRatio: 0.05,
threshold: 0.2,
animations: 'disabled',
},
},
projects: [
{
name: 'chromium',
name: 'e2e',
testIgnore: '*_visual.spec.ts',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'visual',
testMatch: '*_visual.spec.ts',
use: {
...devices['Desktop Chrome'],
viewport: {width: 1280, height: 720},
},
},
],
webServer: {
command: process.env.CI