Files
2026-07-13 13:15:38 +08:00

27 lines
643 B
JavaScript

import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './test/visual',
timeout: 60_000,
expect: {
timeout: 10_000,
toHaveScreenshot: {
maxDiffPixelRatio: 0.025,
threshold: 0.18,
},
},
snapshotPathTemplate: '{testDir}/__screenshots__/{arg}{ext}',
use: {
baseURL: 'http://127.0.0.1:4173',
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1,
colorScheme: 'light',
},
webServer: {
command: 'npm run dev -- --host 127.0.0.1 --port 4173',
url: 'http://127.0.0.1:4173',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
})