1
- import type { PlaywrightTestConfig } from " @playwright/test" ;
2
- import { devices } from " @playwright/test" ;
1
+ import type { PlaywrightTestConfig } from ' @playwright/test' ;
2
+ import { devices } from ' @playwright/test' ;
3
3
4
4
/**
5
5
* Read environment variables from file.
@@ -10,15 +10,15 @@ import { devices } from "@playwright/test";
10
10
* See https://playwright.dev/docs/test-configuration.
11
11
*/
12
12
const config : PlaywrightTestConfig = {
13
- testDir : " ./src/tests" ,
13
+ testDir : ' ./src/tests' ,
14
14
/* Maximum time one test can run for. */
15
15
timeout : 30 * 1000 ,
16
16
expect : {
17
17
/**
18
18
* Maximum time expect() should wait for the condition to be met.
19
19
* For example in `await expect(locator).toHaveText();`
20
20
*/
21
- timeout : 5000
21
+ timeout : 5000 ,
22
22
} ,
23
23
/* Run tests in files in parallel */
24
24
fullyParallel : true ,
@@ -29,42 +29,42 @@ const config: PlaywrightTestConfig = {
29
29
/* Opt out of parallel tests on CI. */
30
30
workers : process . env . CI ? 1 : 3 ,
31
31
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
32
- reporter : " html" ,
32
+ reporter : process . env . CI ? 'github' : ' html' ,
33
33
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
34
34
use : {
35
35
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
36
36
actionTimeout : 0 ,
37
37
/* Base URL to use in actions like `await page.goto('/')`. */
38
- baseURL : " http://localhost:3000" ,
38
+ baseURL : ' http://localhost:3000' ,
39
39
40
40
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
41
- trace : " on-first-retry" ,
41
+ trace : ' on-first-retry' ,
42
42
43
- viewport : { width : 1920 , height : 1080 }
43
+ viewport : { width : 1920 , height : 1080 } ,
44
44
} ,
45
45
46
46
/* Configure projects for major browsers */
47
47
projects : [
48
48
{
49
- name : " chromium" ,
49
+ name : ' chromium' ,
50
50
use : {
51
- ...devices [ " Desktop Chrome" ]
52
- }
51
+ ...devices [ ' Desktop Chrome' ] ,
52
+ } ,
53
53
} ,
54
54
55
55
{
56
- name : " firefox" ,
56
+ name : ' firefox' ,
57
57
use : {
58
- ...devices [ " Desktop Firefox" ]
59
- }
58
+ ...devices [ ' Desktop Firefox' ] ,
59
+ } ,
60
60
} ,
61
61
62
62
{
63
- name : " webkit" ,
63
+ name : ' webkit' ,
64
64
use : {
65
- ...devices [ " Desktop Safari" ]
66
- }
67
- }
65
+ ...devices [ ' Desktop Safari' ] ,
66
+ } ,
67
+ } ,
68
68
69
69
/* Test against mobile viewports. */
70
70
// {
@@ -96,14 +96,14 @@ const config: PlaywrightTestConfig = {
96
96
] ,
97
97
98
98
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
99
- outputDir : " test-results/" ,
99
+ outputDir : ' test-results/' ,
100
100
101
101
/* Run your local dev server before starting the tests */
102
102
webServer : {
103
103
reuseExistingServer : true ,
104
- command : " npm run dev" ,
105
- port : 3000
106
- }
104
+ command : ' npm run dev' ,
105
+ port : 3000 ,
106
+ } ,
107
107
} ;
108
108
109
109
export default config ;
0 commit comments