-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
70 lines (67 loc) · 2.58 KB
/
playwright.config.ts
File metadata and controls
70 lines (67 loc) · 2.58 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
import type { PlaywrightTestConfig } from "@playwright/test";
import type {
VSCodeTestOptions,
VSCodeWorkerOptions,
} from "vscode-test-playwright";
import * as path from "node:path";
const repoRoot = __dirname;
const config = {
testDir: path.join(repoRoot, "playwright"),
reporter: [["list"]],
// Keep Playwright artifacts (including chat export attachments) even on success,
// and avoid collisions with the harness-managed `test-results/` directory.
outputDir: path.join(repoRoot, "pw-test-results"),
preserveOutput: "always",
// Keep runs consistent across environments; connection diagnostics should not depend on long timeouts.
timeout: 90_000,
expect: {
timeout: 15_000,
},
// Keep this single-worker so the demo is deterministic and doesn't contend for UI.
workers: 1,
fullyParallel: false,
use: {
// Electron/VS Code can be slow to show first window on cold start.
actionTimeout: 15_000,
navigationTimeout: 30_000,
// IMPORTANT: VS Code is launched via a custom Electron fixture in `vscode-test-playwright`.
// Playwright's top-level `video` setting is not automatically applied to that launch.
// Use the fixture's `vscodeVideo` option instead.
video: "off",
trace: "retain-on-failure",
},
projects: [
{
name: "vscode-chat-demo",
// The demo drives Copilot Chat (network + model latency) and VS Code UI.
// Keep this high to avoid flakiness from cold starts.
timeout: 240_000,
use: {
// The `vscode-test-playwright` fixtures read these options.
vscodeVersion: "stable",
vscodeTrace: "off",
vscodeVideo: {
mode: "on",
size: { width: 1280, height: 920 },
// Keep the VS Code window itself at the same pixel dimensions (best-effort).
windowSize: { width: 1280, height: 920 },
},
// Ensure Copilot Chat is available during the demo run. Our extension is
// loaded via extensionDevelopmentPath, but Copilot Chat must be installed
// as a marketplace extension.
//
// NOTE: We do NOT use --disable-extensions here because that would
// prevent Copilot/Copilot Chat from loading.
extensions: ["github.copilot", "github.copilot-chat"],
extensionDevelopmentPath: repoRoot,
baseDir: path.join(
repoRoot,
"test-workspace",
"test-workspace.code-workspace",
),
// Intentionally omit: userDataDir, extensionsDir, extensions.
},
},
],
} satisfies PlaywrightTestConfig<VSCodeTestOptions, VSCodeWorkerOptions>;
export default config;