File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1313 "format" : " biome format --write" ,
1414 "test" : " vitest" ,
1515 "test:bdd" : " cucumber-js" ,
16+ "test:bdd:debug" : " PWDEBUG=1 cucumber-js" ,
1617 "type-check" : " tsc --noEmit" ,
1718 "prepare" : " husky" ,
1819 "oidc" : " node dev-auth/oidc-provider.mjs" ,
Original file line number Diff line number Diff line change @@ -12,13 +12,21 @@ let browser: Browser | undefined;
1212setDefaultTimeout ( 60 * 1000 ) ; // 60s per step
1313
1414Before ( async function ( this : PlaywrightWorld ) {
15+ const isDebug = ! ! process . env . PWDEBUG ;
1516 if ( ! browser ) {
16- browser = await chromium . launch ( { headless : true } ) ;
17+ browser = await chromium . launch ( {
18+ headless : ! isDebug ,
19+ slowMo : isDebug ? 100 : 0 ,
20+ } ) ;
1721 }
1822 const context : BrowserContext = await browser . newContext ( ) ;
1923 const page : Page = await context . newPage ( ) ;
2024 this . context = context ;
2125 this . page = page ;
26+
27+ if ( isDebug ) {
28+ await this . page . pause ( ) ;
29+ }
2230} ) ;
2331
2432After ( async function ( this : PlaywrightWorld ) {
You can’t perform that action at this time.
0 commit comments