-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
37 lines (35 loc) · 940 Bytes
/
playwright.config.ts
File metadata and controls
37 lines (35 loc) · 940 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
import { defineConfig, devices } from "@playwright/test";
const port = Number(process.env.PORT) || 3000;
const baseURL = `http://localhost:${port}`;
export default defineConfig({
testDir: "./test/e2e",
fullyParallel: true,
forbidOnly: false,
retries: 0,
workers: undefined,
reporter: "list",
use: {
baseURL,
trace: "on-first-retry",
headless: false,
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
launchOptions: {
// Headed mode: use real GPU without SwiftShader
args: ["--enable-unsafe-webgpu", "--ignore-gpu-blocklist"],
},
},
},
],
webServer: {
command: `npx http-server -p ${port} -c-1 --cors`,
url: baseURL,
reuseExistingServer: true,
// Ensure server process is terminated after tests (SIGTERM then SIGKILL if needed)
gracefulShutdown: { signal: "SIGTERM", timeout: 2000 },
},
});