-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
26 lines (23 loc) · 827 Bytes
/
playwright.config.ts
File metadata and controls
26 lines (23 loc) · 827 Bytes
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
import { PlaywrightTestConfig, devices } from "@playwright/test";
const baseUrl = process.env.PLAYWRIGHT_TEST_BASE_URL || "http://localhost:3000";
console.log(`ℹ️ Using base URL "${baseUrl}"`);
const opts = {
// launch headless on CI, in browser locally
headless: !!process.env.CI || !!process.env.PLAYWRIGHT_HEADLESS,
// collectCoverage: !!process.env.PLAYWRIGHT_HEADLESS
};
const config: PlaywrightTestConfig = {
testDir: "./playwright",
timeout: 35e3,
outputDir: "./playwright/test-results",
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'
// default 'list' when running locally
reporter: process.env.CI ? "github" : "list",
use: {
...devices["Desktop Chrome"],
baseURL: baseUrl,
headless: opts.headless,
video: "on",
},
};
export default config;