-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
29 lines (27 loc) · 1.18 KB
/
playwright.config.ts
File metadata and controls
29 lines (27 loc) · 1.18 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import { defineConfig } from "@playwright/test";
import * as path from "path";
export default defineConfig({
testDir: path.join(__dirname, "tests"),
reporter: process.env.CI
? [["list"], ["junit", { outputFile: path.join(__dirname, "..", "..", "test-results", "e2e-results.xml") }]]
: "list",
// Java Language Server can take 2-3 minutes to fully index on first run.
timeout: 240_000,
// Run tests sequentially — launching multiple VS Code instances is too resource-heavy.
workers: 1,
// Allow one retry in CI to handle transient environment issues.
retries: process.env.CI ? 1 : 0,
expect: {
timeout: 30_000,
},
globalSetup: path.join(__dirname, "globalSetup.ts"),
use: {
// Capture full trace on every test run locally (includes screenshots,
// DOM snapshots, and network at each Playwright action). In CI,
// retain traces only for failing tests to limit artifact size.
trace: process.env.CI ? "retain-on-failure" : "on",
},
outputDir: path.join(__dirname, "..", "..", "test-results", "e2e"),
});