1+ import path from "node:path" ;
2+ import { fileURLToPath } from "node:url" ;
13import { defineConfig , devices } from "@playwright/test" ;
4+ import dotenv from "dotenv" ;
5+
6+ const __filename = fileURLToPath ( import . meta. url ) ;
7+ dotenv . config ( { path : path . join ( path . dirname ( __filename ) , ".env" ) , quiet : true } ) ;
28
3- /**
4- * See https://playwright.dev/docs/test-configuration.
5- */
69export default defineConfig ( {
7- testDir : "./e2e" ,
8- fullyParallel : true ,
10+ testDir : "./tests/e2e" ,
911 retries : process . env . CI ? 2 : 0 ,
1012 workers : process . env . CI ? 1 : undefined ,
11- reporter : "html " ,
12- snapshotDir : "tests/e2e/snapshots " ,
13- outputDir : "tests/e2e/test-results" ,
13+ snapshotDir : "tests/e2e/output/snapshots " ,
14+ outputDir : "tests/e2e/output/test-results " ,
15+ fullyParallel : true ,
1416 use : {
1517 baseURL : "http://localhost:5173" ,
1618 trace : "on-first-retry" ,
@@ -28,13 +30,25 @@ export default defineConfig({
2830 name : "webkit" ,
2931 use : { ...devices [ "Desktop Safari" ] } ,
3032 } ,
33+ {
34+ name : "Microsoft Edge" ,
35+ use : { ...devices [ "Desktop Edge" ] } ,
36+ } ,
37+ {
38+ name : "Mobile Chrome" ,
39+ use : { ...devices [ "Pixel 5" ] } ,
40+ } ,
41+ ] ,
42+ reporter : [
43+ [ "html" , { open : "never" , outputFolder : "tests/e2e/output/playwright-report" } ] ,
44+ [ "list" ] ,
3145 ] ,
32-
3346 webServer : {
3447 command : "npm run dev" ,
3548 url : "http://localhost:5173" ,
3649 reuseExistingServer : ! process . env . CI ,
3750 stdout : "ignore" ,
3851 stderr : "pipe" ,
52+ timeout : 120 * 1000 ,
3953 } ,
4054} ) ;
0 commit comments