-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
116 lines (113 loc) · 3.17 KB
/
Copy pathplaywright.config.ts
File metadata and controls
116 lines (113 loc) · 3.17 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import { defineConfig, devices } from "@playwright/test";
const reuseExistingServer = !process.env.CI;
/** Mobile viewport shared across mobile projects */
const mobileViewport = { width: 390, height: 844 };
export default defineConfig({
testDir: "./tests/e2e",
timeout: 15_000,
use: {
headless: true,
...devices["Desktop Chrome"],
},
projects: [
{
name: "aquarium",
testMatch: "aquarium.spec.ts",
use: { baseURL: "http://localhost:3004" },
},
{
name: "breakout",
testMatch: "breakout.spec.ts",
use: { baseURL: "http://localhost:3010" },
},
{
name: "floppy-heads",
testMatch: "floppy-heads.spec.ts",
use: { baseURL: "http://localhost:3011" },
},
{
name: "nadion-defense",
testMatch: "nadion-defense.spec.ts",
use: { baseURL: "http://localhost:3012" },
},
{
name: "null-pow",
testMatch: "null-pow.spec.ts",
use: { baseURL: "http://localhost:3013" },
},
{
name: "honeycomb-rush",
testMatch: "honeycomb-rush.spec.ts",
use: { baseURL: "http://localhost:3014" },
},
// Mobile projects
{
name: "aquarium-mobile",
testMatch: "aquarium-mobile.spec.ts",
use: { baseURL: "http://localhost:3004", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
{
name: "breakout-mobile",
testMatch: "breakout-mobile.spec.ts",
use: { baseURL: "http://localhost:3010", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
{
name: "floppy-heads-mobile",
testMatch: "floppy-heads-mobile.spec.ts",
use: { baseURL: "http://localhost:3011", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
{
name: "nadion-defense-mobile",
testMatch: "nadion-defense-mobile.spec.ts",
use: { baseURL: "http://localhost:3012", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
{
name: "null-pow-mobile",
testMatch: "null-pow-mobile.spec.ts",
use: { baseURL: "http://localhost:3013", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
{
name: "honeycomb-rush-mobile",
testMatch: "honeycomb-rush-mobile.spec.ts",
use: { baseURL: "http://localhost:3014", viewport: mobileViewport, isMobile: true, hasTouch: true },
},
],
webServer: [
{
command: "npx vite preview --port 3004",
cwd: "./examples/aquarium",
port: 3004,
reuseExistingServer,
},
{
command: "npx vite preview --port 3010",
cwd: "./examples/breakout",
port: 3010,
reuseExistingServer,
},
{
command: "npx vite preview --port 3011",
cwd: "./examples/floppy-heads",
port: 3011,
reuseExistingServer,
},
{
command: "npx vite preview --port 3012",
cwd: "./examples/nadion-defense",
port: 3012,
reuseExistingServer,
},
{
command: "npx vite preview --port 3013",
cwd: "./examples/null-pow",
port: 3013,
reuseExistingServer,
},
{
command: "npx vite preview --port 3014",
cwd: "./examples/honeycomb-rush",
port: 3014,
reuseExistingServer,
},
],
});