-
Notifications
You must be signed in to change notification settings - Fork 11
/
playwright.config.ts
50 lines (47 loc) · 1.2 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
import { devices, PlaywrightTestConfig } from '@playwright/test';
import dotenv from 'dotenv';
dotenv.config();
const config: PlaywrightTestConfig = {
testDir: './e2e/specs',
testMatch: [/.*spec\.ts/],
timeout: 666_666,
expect: {
timeout: 66_666,
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
reporter: [process.env.CI ? ['blob'] : ['list', { printSteps: true }]],
use: {
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36',
headless: true,
actionTimeout: 0,
baseURL: 'http://localhost:3000',
screenshot: 'only-on-failure',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1920, height: 1080 },
launchOptions: {
args: ['--disable-web-security'],
},
},
},
],
outputDir: 'test-results/',
webServer: {
command: 'bun start',
timeout: 66_666,
url: 'http://127.0.0.1:3000',
reuseExistingServer: !process.env.CI,
stdout: 'ignore',
stderr: 'pipe',
},
};
export default config;