diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d755003d65..962740503d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -171,7 +171,7 @@ it.skip('should work', async ({server, page}) => { - To run tests in non-headless (headed) mode: ```bash -HEADFUL=1 npm run ctest +npm run ctest -- --headed ``` - To run tests with custom browser executable, specify `CRPATH`, `WKPATH` or `FFPATH` env variable that points to browser executable: @@ -183,7 +183,7 @@ CRPATH= npm run ctest - To run tests in slow-mode: ```bash -HEADFUL=1 SLOW_MO=500 npm run wtest +SLOW_MO=500 npm run wtest -- --headed ``` - When should a test be marked with `skip` or `fail`? diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.ts index b8d33a3c24..b4717372da 100644 --- a/tests/library/playwright.config.ts +++ b/tests/library/playwright.config.ts @@ -36,7 +36,7 @@ const getExecutablePath = (browserName: BrowserName) => { const mode = process.env.PW_OUT_OF_PROCESS_DRIVER ? 'driver' : (process.env.PWTEST_MODE || 'default') as ('default' | 'driver' | 'service' | 'service2'); -const headed = !!process.env.HEADFUL; +const headed = process.argv.includes('--headed'); const channel = process.env.PWTEST_CHANNEL as any; const video = !!process.env.PWTEST_VIDEO; const trace = !!process.env.PWTEST_TRACE;