-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (40 loc) · 1.17 KB
/
Copy pathplaywright.config.ts
File metadata and controls
42 lines (40 loc) · 1.17 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
import { defineConfig, devices } from "@playwright/test";
/**
* Playwright Chromium smoke for the DNA Lab.
*
* Boots the real Lab HTTP server (see e2e/lab-server.mjs) and exercises the
* critical route, the health endpoint, and the overview — the journeys that
* must never silently break. Kept intentionally small and deterministic so it
* can gate every push.
*/
const PORT = Number(process.env.DNA_LAB_E2E_PORT || 3210);
const HOST = "127.0.0.1";
const BASE_URL = `http://${HOST}:${PORT}`;
export default defineConfig({
testDir: "./e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [["list"], ["html", { open: "never" }]] : "list",
timeout: 30_000,
expect: { timeout: 10_000 },
use: {
baseURL: BASE_URL,
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: {
command: "node e2e/lab-server.mjs",
url: `${BASE_URL}/api/dna/labs/health`,
timeout: 60_000,
reuseExistingServer: !process.env.CI,
stdout: "pipe",
stderr: "pipe",
env: { DNA_LAB_E2E_PORT: String(PORT) },
},
});