diff --git a/.env.test b/.env.test index 517612ef..447439e3 100644 --- a/.env.test +++ b/.env.test @@ -16,4 +16,7 @@ NEXT_PUBLIC_FIREBASE_EMULATOR=true NODE_ENV=test PORT=8088 -ENVIRONMENT=DEV \ No newline at end of file +ENVIRONMENT=DEV + +# Playwright +DIRECT_SUPABASE_SETUP_IN_PLAYWRIGHT=true \ No newline at end of file diff --git a/playwright.config.ts b/playwright.config.ts index 4d0416a5..2522ddeb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -25,10 +25,12 @@ function getSupabaseEnv() { } } -const supabaseEnv = getSupabaseEnv() - -// Inject into process.env so Playwright and your app code can read them -// Object.assign(process.env, supabaseEnv) +if (process.env.DIRECT_SUPABASE_SETUP_IN_PLAYWRIGHT !== 'true') { + const supabaseEnv = getSupabaseEnv() + + // Inject into process.env so Playwright and your app code can read them + Object.assign(process.env, supabaseEnv) +} export default defineConfig({ testDir: './tests/e2e',