-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
29 lines (27 loc) · 803 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
29 lines (27 loc) · 803 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
import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.BASE_URL || 'http://localhost:5173';
export default defineConfig({
testDir: 'tests',
timeout: 30000,
expect: { timeout: 5000 },
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [['list'], ['html', { outputFolder: 'playwright-report' }]] : 'html',
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } }
],
webServer: process.env.BASE_URL
? undefined
: {
command: 'pnpm dev',
port: 5173,
reuseExistingServer: true,
timeout: 60000
}
});