-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathplaywright.config.ts
60 lines (58 loc) · 1.18 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
import type { ViewportSize} from '@playwright/test';
import { devices, defineConfig } from '@playwright/test';
const viewportOverride: ViewportSize = {
width: 1600,
height: 900,
};
export default defineConfig({
testDir: 'test-e2e',
retries: 1,
forbidOnly: !!process.env.CI,
timeout: 60_000,
expect: {
timeout: 15_000,
},
reporter: 'html',
use: {
headless: true,
ignoreHTTPSErrors: true,
launchOptions: {
// slowMo: 250,
},
contextOptions: {
strictSelectors: true,
},
trace: 'retain-on-failure',
},
webServer: {
command: process.env.CI
? 'npm run test-e2e-server'
: 'npm run dev -- --no-open',
port: 3000,
reuseExistingServer: true,
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: viewportOverride,
permissions: ['clipboard-read', 'clipboard-write'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
viewport: viewportOverride,
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
viewport: viewportOverride,
},
},
],
});