This commit is contained in:
seb
2026-08-09 01:22:49 +02:00
parent 4f0d73e0ea
commit f0e7a523da
22 changed files with 516 additions and 3 deletions

28
playwright.config.js Normal file
View File

@@ -0,0 +1,28 @@
import { defineConfig } from '@playwright/test';
// Screenshot testing against the existing Vite dev harness (localhost:5199).
// Each `data-shot` section of /screenshots.html becomes one reference image
// under tests/screenshots/reference/. Refs are generated on first run; on
// changes regenerate them with `npm run test:screenshots:update`.
export default defineConfig({
testDir: './tests',
fullyParallel: false,
snapshotPathTemplate: '{testDir}/screenshots/reference/{arg}{ext}',
expect: {
toHaveScreenshot: {
// Freeze spinners / transitions so animated states render deterministically.
animations: 'disabled',
},
},
use: {
baseURL: 'http://localhost:5199',
viewport: { width: 1200, height: 800 },
screenshot: 'off',
},
webServer: {
command: 'npm run dev',
url: 'http://localhost:5199',
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
});