forked from antvis/g-device-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
41 lines (40 loc) · 1 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
import { devices, defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './tests',
timeout: 30 * 1000,
expect: {
timeout: 5000,
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 10 : undefined,
reporter: process.env.CI ? 'blob' : 'html',
use: {
actionTimeout: 0,
trace: 'on-first-retry',
baseURL: 'http://localhost:8080',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
headless: true,
screenshot: 'on',
launchOptions: {
args: ['--headless', '--no-sandbox', '--use-angle=gl'],
},
},
},
],
// Run your local dev server before starting the tests
webServer: {
command: 'npm run dev',
url: 'http://localhost:8080',
reuseExistingServer: !process.env.CI,
stdout: 'ignore',
stderr: 'pipe',
},
snapshotPathTemplate: '{testDir}/__screenshots__/{testFilePath}/{arg}{ext}',
});