-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
57 lines (54 loc) · 1.31 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 2,
workers: process.env.CI ? 1 : undefined,
reporter: "list",
use: {
actionTimeout: 10000,
baseURL: process.env.SIC_TEST_OVERRIDE_URL || "http://127.0.0.1:5174",
trace: "off",
},
projects:
process.env.CI ?
[
/* Playwright Docker can't run Firefox and it's labeled wontfix, how fun */
{
name: "Webkit JS",
use: { ...devices["Desktop Edge"], javaScriptEnabled: true },
},
{
name: "Webkit NoScript",
use: { ...devices["Desktop Edge"], javaScriptEnabled: false },
},
]
: [
{
name: "Firefox JS",
use: { ...devices["Desktop Firefox"], javaScriptEnabled: true },
},
{
name: "Firefox NoScript",
use: { ...devices["Desktop Firefox"], javaScriptEnabled: false },
},
],
webServer:
process.env.SIC_TEST_OVERRIDE_URL ?
undefined
: [
{
command: "npm run dev -- --port 5174",
url: "http://127.0.0.1:5174",
reuseExistingServer: false,
timeout: 300 * 1000,
},
{
command: "SIC_TEST_SEARCH_USE_DUMMY_DB=1 npm run dev -- --port 5175",
url: "http://127.0.0.1:5175",
reuseExistingServer: false,
timeout: 300 * 1000,
},
],
});