forked from estruyf/playwright-github-actions-reporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
77 lines (75 loc) · 1.84 KB
/
playwright.config.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
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
import type { GitHubActionOptions } from "./src/models/GitHubActionOptions";
import { PlaywrightTestConfig, defineConfig, devices } from "@playwright/test";
const config: PlaywrightTestConfig<{}, {}> = {
testDir: "./tests",
timeout: 3 * 60 * 1000,
expect: {
timeout: 30 * 1000,
},
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 2,
workers: process.env.CI ? 1 : 1,
reporter: [
// ["list"],
[
"./src/index.ts",
<GitHubActionOptions>{
title: "Reporter (details: false, report: fail, flaky, skipped)",
useDetails: false,
showError: true,
quiet: false,
includeResults: ["fail", "flaky", "skipped"],
},
],
[
"./src/index.ts",
<GitHubActionOptions>{
title: "Reporter (details: false, report: pass, skipped)",
useDetails: false,
showError: true,
quiet: false,
includeResults: ["pass", "skipped"],
},
],
[
"./src/index.ts",
<GitHubActionOptions>{
title: "Reporter (details: true, report: fail, flaky, skipped)",
useDetails: true,
quiet: true,
includeResults: ["fail", "flaky", "skipped"],
},
],
],
use: {
actionTimeout: 0,
trace: "on-first-retry",
},
projects: [
{
name: "setup",
testMatch: "setup.spec.ts",
},
{
name: "chromium",
// dependencies: ["setup"],
use: {
...devices["Desktop Chrome"],
viewport: { width: 1920, height: 1080 },
},
},
// {
// name: "firefox",
// // dependencies: ["setup"],
// use: {
// ...devices["Desktop Firefox"],
// viewport: { width: 1920, height: 1080 },
// },
// },
],
};
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig(config);