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 {
659659 this . isAuthenticated = true ;
660660 }
661661 }
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+
665663 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 ) ;
666667 await this . page . tracing . start ( { screenshots : true , path : fileName } ) ;
667668 this . currentRunningTest . artifacts . trace = fileName ;
668669 }
You can’t perform that action at this time.
0 commit comments