-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaywright.config.ts
39 lines (32 loc) · 1.01 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
import type { PlaywrightTestConfig } from '@playwright/test'
import { devices } from '@playwright/test'
import os from 'os'
const config: PlaywrightTestConfig = {
testDir: './tests',
timeout: 30 * 1000,
fullyParallel: true,
workers: os.cpus().length - (process.env.CI ? 0 : 2),
forbidOnly: !!process.env.CI,
maxFailures: process.env.CI ? 10 : undefined,
expect: {
timeout: 5 * 1000,
},
reporter: process.env.CI ? [['github']] : [['line'], ['html', { open: 'never' }]],
use: {
baseURL: 'http://localhost:3000',
actionTimeout: 5 * 1000,
launchOptions: { ignoreDefaultArgs: ['--hide-scrollbars'] },
screenshot: 'only-on-failure',
},
projects: [
{ name: 'chrome', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'safari', use: { ...devices['Desktop Safari'] } },
],
webServer: {
command: 'yarn test:start-examples',
port: 3000,
reuseExistingServer: !process.env.CI,
},
}
export default config