-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (39 loc) · 1.13 KB
/
Copy pathplaywright.config.ts
File metadata and controls
43 lines (39 loc) · 1.13 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
43
import { defineConfig, devices } from "@playwright/test";
const updateDocsScreenshots = process.env.UPDATE_DOC_SCREENSHOTS === "1";
const localWorkers = Number.parseInt(process.env.PLAYWRIGHT_WORKERS ?? "4", 10);
const workers = process.env.CI ? 1 : Math.max(1, localWorkers);
const reporter = process.env.PLAYWRIGHT_HTML_REPORT === "1" ? "html" : "line";
/**
* Playwright configuration for JobSentinel E2E tests.
* Tests run against the Vite dev server.
*/
export default defineConfig({
testDir: "./tests/e2e/playwright",
testIgnore: updateDocsScreenshots ? [] : ["**/screenshots.spec.ts"],
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers,
reporter,
use: {
baseURL: "http://localhost:5173",
reducedMotion: "reduce",
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
],
webServer: {
command: "npm run dev:mock",
url: "http://localhost:5173",
reuseExistingServer: !process.env.CI,
timeout: 30000,
},
});