1- import { defineConfig , devices } from '@playwright/test' ;
1+ import { defineConfig , devices } from "@playwright/test" ;
2+ import dotenv from "dotenv" ;
3+
4+ // Load test environment variables
5+ dotenv . config ( { path : ".env.test" } ) ;
26
37/**
48 * Read environment variables from file.
@@ -12,7 +16,7 @@ import { defineConfig, devices } from '@playwright/test';
1216 * See https://playwright.dev/docs/test-configuration.
1317 */
1418export default defineConfig ( {
15- testDir : ' ./src/e2e' ,
19+ testDir : " ./src/e2e" ,
1620 /* Run tests in files in parallel */
1721 fullyParallel : true ,
1822 /* Fail the build on CI if you accidentally left test.only in the source code. */
@@ -22,31 +26,31 @@ export default defineConfig({
2226 /* Opt out of parallel tests on CI. */
2327 workers : process . env . CI ? 1 : undefined ,
2428 /* Reporter to use. See https://playwright.dev/docs/test-reporters */
25- reporter : ' html' ,
29+ reporter : " html" ,
2630 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2731 use : {
2832 /* Base URL to use in actions like `await page.goto('/')`. */
2933 // baseURL: 'http://localhost:3000',
3034
3135 /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
32- trace : ' on-first-retry' ,
36+ trace : " on-first-retry" ,
3337 } ,
3438
3539 /* Configure projects for major browsers */
3640 projects : [
3741 {
38- name : ' chromium' ,
39- use : { ...devices [ ' Desktop Chrome' ] } ,
42+ name : " chromium" ,
43+ use : { ...devices [ " Desktop Chrome" ] } ,
4044 } ,
4145
4246 {
43- name : ' firefox' ,
44- use : { ...devices [ ' Desktop Firefox' ] } ,
47+ name : " firefox" ,
48+ use : { ...devices [ " Desktop Firefox" ] } ,
4549 } ,
4650
4751 {
48- name : ' webkit' ,
49- use : { ...devices [ ' Desktop Safari' ] } ,
52+ name : " webkit" ,
53+ use : { ...devices [ " Desktop Safari" ] } ,
5054 } ,
5155
5256 /* Test against mobile viewports. */
0 commit comments