-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
108 lines (104 loc) · 3.43 KB
/
playwright.config.ts
File metadata and controls
108 lines (104 loc) · 3.43 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { defineConfig, type ReporterDescription } from "@playwright/test";
const isCI = !!process.env.CI;
const isWindowsCI = process.platform === "win32" && isCI;
// macOS local: parallel cold launches contend for crashpad Mach ports
// (FATAL kr == KERN_SUCCESS in exception_handler_server.cc), so serialize.
// CI runners cycle Electron processes more slowly and don't hit this.
const isMacLocal = process.platform === "darwin" && !isCI;
const e2eWorkers = isWindowsCI || isMacLocal ? 1 : 2;
// Per-test timeout: allow enough time for launch retries + test execution.
// launchApp retries up to 3x with 75s timeout per attempt on Windows CI.
// macOS local: 3x50s retries = 152s, leaves ~88s for test work in 240s window.
const coreTimeout = isWindowsCI ? 300_000 : isMacLocal ? 240_000 : 120_000;
const onlineTimeout = isWindowsCI ? 480_000 : 300_000;
// Blob reporter is opted into by the nightly multi-OS matrix only, so per-leg
// outputs can be merged into a single unified HTML report. PR CI and local
// runs keep the default reporters.
const useBlobReporter = process.env.PLAYWRIGHT_BLOB_REPORT === "1";
const reporter: ReporterDescription[] | undefined = useBlobReporter
? [["github"], ["blob", { outputDir: "blob-report" }]]
: undefined;
export default defineConfig({
workers: e2eWorkers,
fullyParallel: false,
timeout: 180_000,
expect: { timeout: isWindowsCI ? 15_000 : isCI ? 10_000 : 5_000 },
outputDir: "./test-results",
...(reporter ? { reporter } : {}),
use: {
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
projects: [
{
name: "core",
testDir: "./e2e/core",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-terminal",
testDir: "./e2e/full/terminal",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-worktree",
testDir: "./e2e/full/worktree",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-presets",
testDir: "./e2e/full/presets",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-platform",
testDir: "./e2e/full/platform",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-panels",
testDir: "./e2e/full/panels",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "full-resilience",
testDir: "./e2e/full/resilience",
timeout: coreTimeout,
retries: isCI ? 2 : 0,
},
{
name: "online",
testDir: "./e2e/online",
timeout: onlineTimeout,
retries: isCI ? 2 : 0,
},
{
name: "nightly",
testDir: "./e2e/nightly",
timeout: 600_000,
retries: 0,
},
{
// Marketing screenshot pipeline — runs on demand via
// .github/workflows/screenshots.yml. Each spec opens a separate demo
// repo, drives a deterministic UI state, and writes a PNG to
// artifacts/screenshots/. Real Anthropic API calls happen for the
// agent-state shots, so flake is non-zero; we surface failures rather
// than retry them (the workflow is manually rerun).
//
// 1800s (30 min) per scene — multi-agent + heavy fixed waits eat
// budget on Windows cold launches. We'd rather wait long than
// ship a screenshot of a half-painted panel.
name: "screenshots",
testDir: "./e2e/screenshots",
timeout: 1_800_000,
retries: 0,
},
],
});