From 42d28da29963aef1800732deb6464d9d20bc4a59 Mon Sep 17 00:00:00 2001 From: Okechi Jones-Williams Date: Thu, 2 Apr 2026 16:58:26 +0100 Subject: [PATCH] . --- .env.test | 5 ++++- playwright.config.ts | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) 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',