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' ;
33
44/**
55 * Read environment variables from file.
@@ -10,15 +10,15 @@ import { devices } from "@playwright/test";
1010 * See https://playwright.dev/docs/test-configuration.
1111 */
1212const config : PlaywrightTestConfig = {
13- testDir : " ./src/tests" ,
13+ testDir : ' ./src/tests' ,
1414 /* Maximum time one test can run for. */
1515 timeout : 30 * 1000 ,
1616 expect : {
1717 /**
1818 * Maximum time expect() should wait for the condition to be met.
1919 * For example in `await expect(locator).toHaveText();`
2020 */
21- timeout : 5000
21+ timeout : 5000 ,
2222 } ,
2323 /* Run tests in files in parallel */
2424 fullyParallel : true ,
@@ -29,42 +29,42 @@ const config: PlaywrightTestConfig = {
2929 /* Opt out of parallel tests on CI. */
3030 workers : process . env . CI ? 1 : 3 ,
3131 /* Reporter to use. See https://playwright.dev/docs/test-reporters */
32- reporter : " html" ,
32+ reporter : process . env . CI ? 'github' : ' html' ,
3333 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
3434 use : {
3535 /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
3636 actionTimeout : 0 ,
3737 /* Base URL to use in actions like `await page.goto('/')`. */
38- baseURL : " http://localhost:3000" ,
38+ baseURL : ' http://localhost:3000' ,
3939
4040 /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
41- trace : " on-first-retry" ,
41+ trace : ' on-first-retry' ,
4242
43- viewport : { width : 1920 , height : 1080 }
43+ viewport : { width : 1920 , height : 1080 } ,
4444 } ,
4545
4646 /* Configure projects for major browsers */
4747 projects : [
4848 {
49- name : " chromium" ,
49+ name : ' chromium' ,
5050 use : {
51- ...devices [ " Desktop Chrome" ]
52- }
51+ ...devices [ ' Desktop Chrome' ] ,
52+ } ,
5353 } ,
5454
5555 {
56- name : " firefox" ,
56+ name : ' firefox' ,
5757 use : {
58- ...devices [ " Desktop Firefox" ]
59- }
58+ ...devices [ ' Desktop Firefox' ] ,
59+ } ,
6060 } ,
6161
6262 {
63- name : " webkit" ,
63+ name : ' webkit' ,
6464 use : {
65- ...devices [ " Desktop Safari" ]
66- }
67- }
65+ ...devices [ ' Desktop Safari' ] ,
66+ } ,
67+ } ,
6868
6969 /* Test against mobile viewports. */
7070 // {
@@ -96,14 +96,14 @@ const config: PlaywrightTestConfig = {
9696 ] ,
9797
9898 /* Folder for test artifacts such as screenshots, videos, traces, etc. */
99- outputDir : " test-results/" ,
99+ outputDir : ' test-results/' ,
100100
101101 /* Run your local dev server before starting the tests */
102102 webServer : {
103103 reuseExistingServer : true ,
104- command : " npm run dev" ,
105- port : 3000
106- }
104+ command : ' npm run dev' ,
105+ port : 3000 ,
106+ } ,
107107} ;
108108
109109export default config ;
0 commit comments