-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
34 lines (33 loc) · 957 Bytes
/
playwright.config.ts
File metadata and controls
34 lines (33 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/visual',
outputDir: './test-results',
snapshotPathTemplate: '{testDir}/__screenshots__/{testFilePath}/{arg}{ext}',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [['html'], ['list']] : 'list',
expect: {
toHaveScreenshot: {
maxDiffPixels: 100,
},
},
webServer: {
command: 'pnpm exec vite serve --host 127.0.0.1 --port 3004',
url: 'http://127.0.0.1:3004',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
use: {
...devices['Desktop Chrome'],
baseURL: 'http://127.0.0.1:3004',
channel: 'chrome',
colorScheme: 'light',
deviceScaleFactor: 1,
locale: 'en-US',
timezoneId: 'UTC',
viewport: { width: 1280, height: 900 },
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
},
});