forked from stolinski/graffiti
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (41 loc) · 1.04 KB
/
Copy pathplaywright.config.ts
File metadata and controls
43 lines (41 loc) · 1.04 KB
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
37
38
39
40
41
42
43
import { defineConfig, devices } from "@playwright/test";
const baseURL = "http://127.0.0.1:6124";
export default defineConfig({
testDir: "tests/visual",
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "list",
snapshotPathTemplate:
"{testDir}/__screenshots__/{testFilePath}/{projectName}/{arg}{ext}",
use: {
baseURL,
trace: "retain-on-failure",
video: "retain-on-failure",
screenshot: "only-on-failure",
colorScheme: "light",
timezoneId: "UTC",
locale: "en-US",
},
webServer: {
command:
"npm run build && npx vite preview --host 127.0.0.1 --port 6124 --strictPort",
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 180000,
},
projects: [
{
name: "desktop-chromium",
use: {
...devices["Desktop Chrome"],
viewport: { width: 1440, height: 1200 },
},
},
{
name: "mobile-chromium",
use: {
...devices["Pixel 7"],
},
},
],
});