-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.pre-push.ts
More file actions
42 lines (39 loc) · 1.03 KB
/
playwright.config.pre-push.ts
File metadata and controls
42 lines (39 loc) · 1.03 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';
/**
* Pre-push specific Playwright configuration
* Tests against built files served via docusaurus serve
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: false, // Sequential for pre-push reliability
forbidOnly: true,
retries: 1, // One retry for flaky tests
workers: 1, // Single worker for stability
reporter: [
['list'],
['json', { outputFile: 'test-results/e2e-pre-push-results.json' }]
],
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
/* Test only essential browsers for pre-push */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'mobile',
use: { ...devices['Pixel 5'] },
}
],
/* No automatic server - we'll manage it manually in pre-push hook */
// webServer: undefined,
});