forked from DustinBrett/daedalOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
46 lines (43 loc) · 1.1 KB
/
playwright.config.ts
File metadata and controls
46 lines (43 loc) · 1.1 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
import { type PlaywrightTestConfig, devices } from "@playwright/test";
const OVERRIDE_URL = "";
const { CI, PORT = 3000 } = process.env;
const {
"Desktop Chrome": chrome,
"Desktop Firefox": firefox,
"Desktop Safari": safari,
} = devices;
const baseURL = OVERRIDE_URL || `http://localhost:${PORT}`;
const config: PlaywrightTestConfig = {
fullyParallel: true,
projects: [
{
name: "chromium",
use: CI
? chrome
: {
...chrome,
launchOptions: {
args: ["--enable-gpu", "--use-gl=angle"],
},
},
},
{ name: "firefox", use: firefox },
{ name: "webkit", use: safari },
],
reporter: [["list"], ["html", { open: CI ? "never" : "always" }]],
retries: CI ? 3 : 1,
testDir: "e2e",
use: {
baseURL,
trace: "retain-on-failure",
video: "retain-on-failure",
},
webServer: {
command: OVERRIDE_URL ? "" : CI ? "yarn serve" : "yarn dev",
reuseExistingServer: Boolean(OVERRIDE_URL),
url: OVERRIDE_URL || baseURL,
},
workers: CI ? 1 : undefined,
};
// ts-prune-ignore-next
export default config;