-
Notifications
You must be signed in to change notification settings - Fork 84
/
playwright.config.ts
79 lines (73 loc) · 1.87 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
78
79
import { defineConfig, devices } from '@playwright/test';
import 'dotenv/config';
export default defineConfig({
testDir: './e2e',
reporter: process.env.TEST_SHARDED ? 'blob' : 'html',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 3,
workers: 1,
timeout: 5 * 60 * 1_000,
expect: {
timeout: 20 * 1000,
},
reportSlowTests: {
threshold: 60 * 1_000,
max: 10,
},
use: {
testIdAttribute: 'data-automation-id',
actionTimeout: 20 * 1_000,
baseURL: 'http://localhost:4200',
video: 'on-first-retry',
trace: 'on',
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], permissions: ['clipboard-read', 'clipboard-write', 'accessibility-events'] },
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
launchOptions: {
firefoxUserPrefs: {
'dom.events.asyncClipboard.readText': true,
'dom.events.testing.asyncClipboard': true,
},
},
},
},
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
/* Run your local dev server before starting the tests */
webServer: {
command: 'pnpm run start:e2e',
url: 'http://localhost:4200/',
ignoreHTTPSErrors: true,
reuseExistingServer: !process.env.CI,
},
});