-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaywright.config.ts
36 lines (34 loc) · 938 Bytes
/
playwright.config.ts
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
35
36
import { defineConfig, expect } from "@playwright/test"
import axeMatchers from "expect-axe-playwright"
import { fileURLToPath } from "node:url"
expect.extend(axeMatchers)
export default defineConfig({
expect: {
toHaveScreenshot: {
maxDiffPixelRatio: 0.25,
},
},
forbidOnly: !!process.env.CI,
fullyParallel: true,
reporter: process.env.CI ? "dot" : "list",
retries: process.env.CI ? 2 : 0,
snapshotPathTemplate: "{testDir}/__snapshots__/{testFilePath}/{arg}{ext}",
testDir: fileURLToPath(new URL("./e2e/test", import.meta.url)),
use: {
axeOptions: {
rules: {
"color-contrast": { enabled: false },
},
},
baseURL: "http://127.0.0.1:3000",
screenshot: "only-on-failure",
trace: "on-first-retry",
},
webServer: {
command: "pnpm dev",
reuseExistingServer: !process.env.CI,
stderr: "pipe",
stdout: "ignore",
url: "http://127.0.0.1:3000",
},
})