@@ -22,30 +22,50 @@ export default defineConfig({
22
22
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
23
23
reporter : "html" ,
24
24
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
25
+ globalSetup : "./tests/e2eTests/global.setup.ts" ,
25
26
use : {
26
27
/* Base URL to use in actions like `await page.goto('/')`. */
27
- // baseURL: ' http://127.0.0.1:3000' ,
28
-
28
+ baseURL : " http://localhost:5173/" ,
29
+ storageState : "./tests/e2eTests/auth.json" ,
29
30
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
30
31
trace : "on-first-retry" ,
31
32
} ,
32
33
33
34
/* Configure projects for major browsers */
34
35
projects : [
35
36
{
36
- name : "chromium " ,
37
- use : { ... devices [ "Desktop Chrome" ] } ,
37
+ name : "setup " ,
38
+ testMatch : / g l o b a l \. s e t u p \. t s / ,
38
39
} ,
39
-
40
40
{
41
- name : "firefox" ,
42
- use : { ...devices [ "Desktop Firefox" ] } ,
41
+ name : "logged in chromium" ,
42
+ dependencies : [ "setup" ] ,
43
+ use : {
44
+ ...devices [ "Desktop Chrome" ] ,
45
+ storageState : "./tests/e2eTests/auth.json" ,
46
+ } ,
47
+ testIgnore : [ "**/authentication/**/*.ts" ] ,
43
48
} ,
44
-
45
49
{
46
- name : "webkit" ,
47
- use : { ...devices [ "Desktop Safari" ] } ,
50
+ name : "authentication" ,
51
+ use : { ...devices [ "Desktop Chrome" ] } ,
52
+ testMatch : "**/authentication/**/*.ts" ,
53
+ testIgnore : [ "**/global.setup.ts" ] ,
48
54
} ,
55
+ // {
56
+ // name: "chromium",
57
+ // use: { ...devices["Desktop Chrome"] },
58
+ // },
59
+ //
60
+ // {
61
+ // name: "firefox",
62
+ // use: { ...devices["Desktop Firefox"] },
63
+ // },
64
+ //
65
+ // {
66
+ // name: "webkit",
67
+ // use: { ...devices["Desktop Safari"] },
68
+ // },
49
69
50
70
/* Test against mobile viewports. */
51
71
// {
0 commit comments