Skip to content

Commit

Permalink
Add environment variables to playwright.config.ts (#10171)
Browse files Browse the repository at this point in the history
  • Loading branch information
allie500 authored Jan 16, 2025
1 parent c26ed15 commit 2d318c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/dev-playwright-config-import-e2e-env-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Add E2E environment variables to Playwright config.
5 changes: 5 additions & 0 deletions tests/e2e-pw/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* External dependencies
*/
import { defineConfig, devices } from '@playwright/test';
import { config } from 'dotenv';
import path from 'path';

config( { path: path.resolve( __dirname, '../e2e/config', '.env' ) } );
config( { path: path.resolve( __dirname, '../e2e/config', 'local.env' ) } );

const { BASE_URL } = process.env;

Expand Down

0 comments on commit 2d318c3

Please sign in to comment.