forked from module-federation/vite
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (38 loc) · 1.02 KB
/
playwright.config.ts
File metadata and controls
39 lines (38 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 } from '@playwright/test';
export default defineConfig({
testDir: 'tests',
timeout: 30 * 1000,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
forbidOnly: Boolean(process.env.CI),
use: {
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'multi-example',
testDir: 'e2e/vite-webpack-rspack',
use: {
baseURL: 'http://localhost:5173',
browserName: 'chromium',
},
},
// Test production build via preview mode - validates Vite 7/Rolldown compatibility
{
name: 'multi-example-preview',
testDir: 'e2e/vite-webpack-rspack',
use: {
baseURL: 'http://localhost:4173',
browserName: 'chromium',
},
},
],
outputDir: 'reports/e2e/output',
reporter: [
['list'],
['html', { outputFolder: 'reports/e2e/playwright-report', open: 'never' }],
['json', { outputFile: 'reports/e2e/test-results.json' }],
],
});