-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
executable file
·62 lines (61 loc) · 1.42 KB
/
playwright.config.ts
File metadata and controls
executable file
·62 lines (61 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
webServer: {
command: "npm run build && npm run preview",
port: 4173,
},
testDir: "e2e",
fullyParallel: true,
forbidOnly: process.env.CI === "true" || process.env.CI === "1",
retries: 2,
reporter: [["html", { open: "never" }]],
use: {
baseURL: "http://localhost:4173",
trace: "on-first-retry",
screenshot: "only-on-failure",
actionTimeout: 10_000,
navigationTimeout: 30_000,
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
testIgnore: ["**/ios-safari.spec.ts", "**/android-chrome.spec.ts"],
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
testIgnore: ["**/ios-safari.spec.ts", "**/android-chrome.spec.ts"],
},
// iOS Safari tests
{
name: "ios-safari",
use: {
...devices["iPhone 14"],
},
testMatch: "**/ios-safari.spec.ts",
},
{
name: "ipad",
use: {
...devices["iPad Pro 11"],
},
testMatch: "**/ios-safari.spec.ts",
},
// Android Chrome tests
{
name: "android-chrome",
use: {
...devices["Pixel 7"],
},
testMatch: "**/android-chrome.spec.ts",
},
{
name: "android-tablet",
use: {
...devices["Galaxy Tab S4"],
},
testMatch: "**/android-chrome.spec.ts",
},
],
});