File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -659,10 +659,11 @@ class Puppeteer extends Helper {
659
659
this . isAuthenticated = true ;
660
660
}
661
661
}
662
- const fileName = `${ `${ global . output_dir } ${ path . sep } trace${ path . sep } ${ uuidv4 ( ) } _${ clearString ( this . currentRunningTest . title ) } ` . slice ( 0 , 245 ) } .json` ;
663
- const dir = path . dirname ( fileName ) ;
664
- if ( ! fileExists ( dir ) ) fs . mkdirSync ( dir ) ;
662
+
665
663
if ( this . options . trace ) {
664
+ const fileName = `${ `${ global . output_dir } ${ path . sep } trace${ path . sep } ${ uuidv4 ( ) } _${ clearString ( this . currentRunningTest . title ) } ` . slice ( 0 , 245 ) } .json` ;
665
+ const dir = path . dirname ( fileName ) ;
666
+ if ( ! fileExists ( dir ) ) fs . mkdirSync ( dir ) ;
666
667
await this . page . tracing . start ( { screenshots : true , path : fileName } ) ;
667
668
this . currentRunningTest . artifacts . trace = fileName ;
668
669
}
You can’t perform that action at this time.
0 commit comments