diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 7f80ae9..ee96784 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -1,9 +1,12 @@ import { defineConfig } from '@playwright/test'; import dotenv from 'dotenv'; -import path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname, resolve } from 'path'; // Load e2e/.env.test if it exists (contains OPENAI_TEST_API_KEY) -dotenv.config({ path: path.resolve(__dirname, '.env.test') }); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +dotenv.config({ path: resolve(__dirname, '.env.test') }); /** * Playwright configuration for AI Weekly Synth E2E tests.