-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (36 loc) · 1.02 KB
/
Copy pathplaywright.config.ts
File metadata and controls
39 lines (36 loc) · 1.02 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
import { defineConfig, devices } from '@playwright/test'
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'list',
timeout: 1000, // 1 second timeout
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
actionTimeout: 1000, // 1 second for actions
navigationTimeout: 5000 // 5 seconds for navigation
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
}
],
// webServer: {
// command: 'pnpm run dev -- --port 3001',
// url: 'http://localhost:3001',
// reuseExistingServer: !process.env.CI,
// timeout: 120 * 1000, // 2 minutes
// env: {
// // Test environment variables
// OPENROUTER_API_KEY: 'test-api-key',
// OPENROUTER_MODEL: 'test-model',
// USE_MOCK_AI: 'true',
// NEXT_PUBLIC_APP_URL: 'http://localhost:3001',
// NODE_ENV: 'test'
// }
// }
})