forked from DFXswiss/services
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (39 loc) · 1.25 KB
/
playwright.config.ts
File metadata and controls
42 lines (39 loc) · 1.25 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
41
42
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
snapshotDir: './e2e/screenshots/baseline',
snapshotPathTemplate: '{snapshotDir}/{testFileName}-{arg}-{projectName}-{platform}{ext}',
outputDir: './e2e/test-results',
// Keep test results after test run
preserveOutput: 'always',
// Disable parallel execution to prevent API rate limiting
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
// Use single worker to prevent rate limiting
workers: 1,
// Use list reporter for real-time progress, html for detailed results
// HTML report is saved to playwright-report/ and persists across runs
reporter: process.env.CI ? 'html' : [['list'], ['html', { open: 'never', outputFolder: 'playwright-report' }]],
// Global timeout for tests
timeout: 60000,
use: {
baseURL: 'http://localhost:3001',
// Always capture traces, screenshots and videos
trace: 'on',
screenshot: 'on',
video: 'on',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm start',
url: 'http://localhost:3001',
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});