@@ -9,12 +9,12 @@ console.log(`Running tests on ${baseURL}`);
99 */
1010export default defineConfig ( {
1111 testDir : './e2e' ,
12- fullyParallel : false ,
12+ fullyParallel : true , // Enable parallel test execution within files
1313 /* Fail the build on CI if you accidentally left test.only in the source code. */
1414 forbidOnly : ! ! process . env . CI ,
1515 /* Retry on CI only */
1616 retries : process . env . CI ? 2 : 0 ,
17- workers : 1 , // Run tests sequentially to avoid database race conditions
17+ workers : process . env . CI ? 2 : 4 , // Parallel workers ( tests with shared state use serial mode)
1818 /* Reporter to use. See https://playwright.dev/docs/test-reporters */
1919 reporter : [
2020 [ 'list' ] , // Console output
@@ -40,16 +40,37 @@ export default defineConfig({
4040 /* Set up database before running tests */
4141 globalSetup : require . resolve ( './e2e/global-setup.ts' ) ,
4242
43- /* Configure projects for major browsers */
43+ /* Configure projects for different test types */
4444 projects : [
45+ // Read-only tests can run in parallel (no shared state mutations)
4546 {
46- name : 'chromium' ,
47+ name : 'readonly' ,
48+ testMatch : [
49+ / a c c e s s i b i l i t y \. s p e c \. t s / ,
50+ / a d m i n - f u n c t i o n a l i t y \. s p e c \. t s / ,
51+ / a d m i n - o b s e r v a b i l i t y \. s p e c \. t s / ,
52+ / a d m i n - p r o t e c t i o n \. s p e c \. t s / ,
53+ ] ,
4754 use : { ...devices [ 'Desktop Chrome' ] } ,
48- testIgnore : / s e t u p - w i z a r d \. s p e c \. t s / ,
4955 } ,
56+ // Tests that mutate shared state must run sequentially
57+ {
58+ name : 'mutations' ,
59+ testMatch : [
60+ / a d m i n - m a i n t e n a n c e \. s p e c \. t s / ,
61+ / o n b o a r d i n g - f l o w \. s p e c \. t s / ,
62+ / p u b l i c - f l o w s \. s p e c \. t s / ,
63+ / u s e r - s c e n a r i o s \. s p e c \. t s / ,
64+ ] ,
65+ fullyParallel : false ,
66+ workers : 1 ,
67+ use : { ...devices [ 'Desktop Chrome' ] } ,
68+ } ,
69+ // Setup wizard runs in complete isolation
5070 {
5171 name : 'setup-wizard' ,
5272 testMatch : / s e t u p - w i z a r d \. s p e c \. t s / ,
73+ fullyParallel : false ,
5374 workers : 1 ,
5475 use : { ...devices [ 'Desktop Chrome' ] } ,
5576 } ,
0 commit comments