-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.js
More file actions
35 lines (33 loc) · 951 Bytes
/
Copy pathplaywright.config.js
File metadata and controls
35 lines (33 loc) · 951 Bytes
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
// ESM config to work with "type": "module"
import { defineConfig, devices } from '@playwright/test';
const BASE_URL = process.env.BASE_URL || 'http://localhost:8080';
export default defineConfig({
testDir: 'tests/e2e',
fullyParallel: true,
retries: process.env.CI ? 1 : 0,
reporter: [['list'], ['html', { outputFolder: 'playwright-report', open: 'never' }]],
use: {
baseURL: BASE_URL,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
actionTimeout: 10_000,
navigationTimeout: 15_000
},
// Automatically start server before tests
webServer: {
command: process.env.CI ? 'npm run preview -- --port 8080' : 'npm run dev -- --port 8080',
port: 8080,
reuseExistingServer: !process.env.CI,
timeout: 30000
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] }
}
]
});