1- import type { PlaywrightTestConfig } from '@playwright/test' ;
2- import { devices } from '@playwright/test' ;
1+ import { defineConfig , devices } from '@playwright/test' ;
32
43/**
54 * Read environment variables from file.
@@ -10,7 +9,7 @@ import { devices } from '@playwright/test';
109/**
1110 * See https://playwright.dev/docs/test-configuration.
1211 */
13- const config : PlaywrightTestConfig = {
12+ export default defineConfig ( {
1413 testDir : './tests' ,
1514 /* Maximum time one test can run for. */
1615 timeout : 20 * 1000 ,
@@ -19,7 +18,7 @@ const config: PlaywrightTestConfig = {
1918 * Maximum time expect() should wait for the condition to be met.
2019 * For example in `await expect(locator).toHaveText();`
2120 */
22- timeout : 5000
21+ timeout : 5000 ,
2322 } ,
2423
2524 /* Run tests in files in parallel */
@@ -40,7 +39,7 @@ const config: PlaywrightTestConfig = {
4039 use : {
4140 viewport : null ,
4241 // extraHTTPHeaders: {
43- // "Authorozation " : "Basic"
42+ // "Authorization " : "Basic"
4443 // },
4544 /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
4645 actionTimeout : 0 ,
@@ -52,8 +51,8 @@ const config: PlaywrightTestConfig = {
5251 video : 'retry-with-video' ,
5352 launchOptions : {
5453 headless : true ,
55- args : [ "--start-maximized" ]
56- }
54+ args : [ "--start-maximized" ] ,
55+ } ,
5756 // httpCredentials: {
5857 // username: 'bill',
5958 // password: 'pa55w0rd',
@@ -68,7 +67,6 @@ const config: PlaywrightTestConfig = {
6867 ...devices [ 'Desktop Chrome' ] ,
6968 screenshot : 'on' ,
7069 trace : 'on' ,
71-
7270 } ,
7371 } ,
7472
@@ -108,7 +106,6 @@ const config: PlaywrightTestConfig = {
108106 // },
109107 // },
110108 // {
111- // {
112109 // name: 'Google Chrome',
113110 // use: {
114111 // channel: 'chrome',
@@ -124,6 +121,5 @@ const config: PlaywrightTestConfig = {
124121 // command: 'npm run start',
125122 // port: 3000,
126123 // },
127- } ;
124+ } ) ;
128125
129- export default config ;
0 commit comments