@@ -4,7 +4,7 @@ import { defineConfig, devices } from '@playwright/test'
44 * Playwright E2E Test Configuration for GitBox
55 *
66 * Configures auth setup with cookie injection for Supabase + GitHub OAuth,
7- * and logged-in test projects that depend on the auth state .
7+ * and separate projects for authenticated vs unauthenticated tests .
88 */
99
1010/** Path to store authenticated state for reuse across tests */
@@ -37,13 +37,25 @@ export default defineConfig({
3737 projects : [
3838 /**
3939 * Setup project: Injects auth cookies to bypass OAuth flow.
40- * Runs before all other projects that need authentication .
40+ * Runs before authenticated tests .
4141 */
4242 {
4343 name : 'setup' ,
4444 testMatch : / a u t h \. s e t u p \. t s / ,
4545 } ,
4646
47+ /**
48+ * Unauthenticated tests: Landing page, login page, etc.
49+ * These don't require authentication state.
50+ */
51+ {
52+ name : 'unauthenticated' ,
53+ use : {
54+ ...devices [ 'Desktop Chrome' ] ,
55+ } ,
56+ testMatch : / l a n d i n g \. s p e c \. t s | l o g i n \. s p e c \. t s / ,
57+ } ,
58+
4759 /**
4860 * Logged-in tests: Tests that require authenticated state.
4961 * Depends on 'setup' project and uses its stored auth state.
@@ -55,7 +67,7 @@ export default defineConfig({
5567 ...devices [ 'Desktop Chrome' ] ,
5668 storageState : AUTH_FILE ,
5769 } ,
58- testIgnore : / a u t h \. s e t u p \. t s / ,
70+ testMatch : / b o a r d s \. s p e c \. t s | k a n b a n \. s p e c \. t s | s e t t i n g s \. s p e c \. t s / ,
5971 } ,
6072 ] ,
6173
0 commit comments