|
1 | 1 | import { defineConfig } from '@playwright/test'; |
2 | 2 |
|
| 3 | +const serverOptions = { |
| 4 | + reuseExistingServer: !process.env.CI, |
| 5 | + stdout: 'ignore', |
| 6 | + stderr: 'pipe', |
| 7 | +} as const; |
| 8 | + |
3 | 9 | export default defineConfig({ |
4 | 10 | projects: [ |
5 | 11 | { |
6 | 12 | name: 'Default', |
7 | 13 | testMatch: 'test/*.test.ts', |
8 | | - testIgnore: 'test/*.override-components.test.ts', |
| 14 | + testIgnore: [ |
| 15 | + 'test/*.override-components.test.ts', |
| 16 | + 'test/*.lessons-in-part.test.ts', |
| 17 | + 'test/*.lessons-in-root.test.ts', |
| 18 | + ], |
9 | 19 | use: { baseURL: 'http://localhost:4329' }, |
10 | 20 | }, |
11 | 21 | { |
12 | 22 | name: 'Override Components', |
13 | 23 | testMatch: 'test/*.override-components.test.ts', |
14 | 24 | use: { baseURL: 'http://localhost:4330' }, |
15 | 25 | }, |
| 26 | + { |
| 27 | + name: 'Lessons in root', |
| 28 | + testMatch: 'test/*.lessons-in-root.test.ts', |
| 29 | + use: { baseURL: 'http://localhost:4331' }, |
| 30 | + }, |
| 31 | + { |
| 32 | + name: 'Lessons in part', |
| 33 | + testMatch: 'test/*.lessons-in-part.test.ts', |
| 34 | + use: { baseURL: 'http://localhost:4332' }, |
| 35 | + }, |
16 | 36 | ], |
17 | 37 | webServer: [ |
18 | 38 | { |
19 | 39 | command: 'pnpm preview', |
20 | 40 | url: 'http://localhost:4329', |
21 | | - reuseExistingServer: !process.env.CI, |
22 | | - stdout: 'ignore', |
23 | | - stderr: 'pipe', |
| 41 | + ...serverOptions, |
24 | 42 | }, |
25 | 43 | { |
26 | 44 | command: 'pnpm preview:override-components', |
27 | 45 | url: 'http://localhost:4330', |
28 | | - reuseExistingServer: !process.env.CI, |
29 | | - stdout: 'ignore', |
30 | | - stderr: 'pipe', |
| 46 | + ...serverOptions, |
| 47 | + }, |
| 48 | + { |
| 49 | + command: 'pnpm preview:lessons-in-root', |
| 50 | + url: 'http://localhost:4331', |
| 51 | + ...serverOptions, |
| 52 | + }, |
| 53 | + { |
| 54 | + command: 'pnpm preview:lessons-in-part', |
| 55 | + url: 'http://localhost:4332', |
| 56 | + ...serverOptions, |
31 | 57 | }, |
32 | 58 | ], |
33 | 59 | expect: { |
|
0 commit comments