-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
38 lines (34 loc) · 966 Bytes
/
playwright.config.ts
File metadata and controls
38 lines (34 loc) · 966 Bytes
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
import { defineConfig, devices } from "@playwright/test"
export default defineConfig({
testDir: "./playwright/e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 5 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: "html",
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:4000",
trace: "on-first-retry",
extraHTTPHeaders: {
"PLAYWRIGHT-ID": process.env.PLAYWRIGHT_ID || "",
},
},
expect: {
timeout: 10000, // 10 seconds for assertions
},
// Start local dev server before running tests (skip when using external base URL)
webServer: process.env.PLAYWRIGHT_BASE_URL
? undefined
: {
command: "yarn start",
port: 4000,
reuseExistingServer: !process.env.CI,
timeout: 120000, // 2 minutes to start the server
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
})