-
Notifications
You must be signed in to change notification settings - Fork 47
/
playwright.config.ci.ts
45 lines (42 loc) · 1.29 KB
/
playwright.config.ci.ts
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
import { PlaywrightTestConfig } from "@playwright/test"
// Reference: https://playwright.dev/docs/test-configuration
const config: PlaywrightTestConfig = {
// Timeout per test
timeout: 1 * 60 * 1000,
// Timeout per expect
expect: {
timeout: 10 * 1000,
},
// If a test fails, retry it additional 2 times
retries: 2,
// Artifacts folder where screenshots, videos, and traces are stored.
outputDir: "test-results/",
workers: 3,
maxFailures: 10,
use: {
// Retry a test if its failing with enabled tracing. This allows you to analyse the DOM, console logs, network traffic etc.
// More information: https://playwright.dev/docs/trace-viewer
trace: "retain-on-failure",
headless: true,
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
// Artifacts
screenshot: "only-on-failure",
video: "retry-with-video",
},
projects: [
{
name: "Chromium",
use: {
// Configure the browser to use.
browserName: "chromium",
// Any Chromium-specific options.
headless: true,
viewport: { width: 1200, height: 900 },
baseURL: `${process.env.E2E_BASE_PROTOCOL}://${process.env.E2E_BASE_URL}:${process.env.E2E_BASE_PORT}`,
ignoreHTTPSErrors: true,
},
},
],
}
export default config