u
This commit is contained in:
28
playwright.config.js
Normal file
28
playwright.config.js
Normal 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,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user