-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
40 lines (39 loc) · 1.14 KB
/
Copy pathplaywright.config.ts
File metadata and controls
40 lines (39 loc) · 1.14 KB
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
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
// Run tests sequentially — prevents the dev server from being overwhelmed
// by 8 simultaneous requests before it has finished warming up.
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 1,
workers: 1,
reporter: 'html',
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
// Use domcontentloaded so tests don't wait for Firebase/Firestore
// connections (which may hang indefinitely with mock credentials).
navigationTimeout: 60000,
actionTimeout: 15000,
},
// Global per-test timeout
timeout: 60000,
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
// E2E_TEST=true disables `output: 'export'` in next.config.ts so that
// the dev server can run with middleware support.
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 120000,
env: {
NEXT_PUBLIC_E2E_TEST: 'true',
E2E_TEST: 'true',
},
},
});