-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (29 loc) · 781 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
31 lines (29 loc) · 781 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
import { defineConfig, devices } from "@playwright/test";
const port = Number.parseInt(process.env.BROWSER_HARNESS_PORT ?? "5173", 10);
const harnessPort = Number.isFinite(port) ? port : 5173;
const baseURL = `http://127.0.0.1:${harnessPort}/browser-harness.html`;
export default defineConfig({
testDir: "./tests/visual",
fullyParallel: true,
reporter: [["list"]],
use: {
baseURL,
trace: "retain-on-failure"
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] }
}
],
webServer: {
command: "node scripts/browser-harness.mjs",
env: {
BROWSER_HARNESS_PORT: String(harnessPort),
BROWSER_HARNESS_STRICT_PORT: "true"
},
reuseExistingServer: false,
timeout: 30_000,
url: baseURL
}
});