-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplaywright.config.js
More file actions
29 lines (27 loc) · 868 Bytes
/
Copy pathplaywright.config.js
File metadata and controls
29 lines (27 loc) · 868 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'
// CI runs against a remote Netlify deploy preview, which is slower and flakier
// than the local Vite dev server. Give it longer per-test/per-action budgets
// and a couple of retries; keep local fast and strict.
const CI = !!process.env.CI
export default defineConfig({
testDir: './tests/e2e',
timeout: CI ? 60_000 : 30_000,
retries: CI ? 2 : 0,
reporter: 'list',
expect: {
timeout: CI ? 15_000 : 5_000,
},
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:5173',
actionTimeout: CI ? 15_000 : 0,
navigationTimeout: CI ? 30_000 : 0,
screenshot: 'only-on-failure',
video: 'off',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
})