File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ const fs = require('fs');
77const path = require ( 'path' ) ;
88const figures = require ( 'figures' ) ;
99const colors = require ( 'chalk' ) ;
10- const { template, clearString, deleteDir } = require ( '../utils' ) ;
10+ const crypto = require ( 'crypto' ) ;
11+ const { template, deleteDir } = require ( '../utils' ) ;
1112
1213const supportedHelpers = [
1314 'WebDriverIO' ,
@@ -84,13 +85,13 @@ module.exports = function (config) {
8485 let slides = { } ;
8586 let error ;
8687 let savedStep = null ;
87- const uuid = Math . floor ( new Date ( ) . getTime ( ) / 1000 ) ;
8888 const recordedTests = { } ;
8989 const pad = '0000' ;
9090 const reportDir = config . output ? path . resolve ( global . codecept_dir , config . output ) : defaultConfig . output ;
9191
9292 event . dispatcher . on ( event . test . before , ( test ) => {
93- dir = path . join ( reportDir , `record_${ clearString ( test . title ) . substring ( 0 , 20 ) } _${ uuid } ` ) ;
93+ const md5hash = crypto . createHash ( 'md5' ) . update ( test . file + test . title ) . digest ( 'hex' ) ;
94+ dir = path . join ( reportDir , `record_${ md5hash } ` ) ;
9495 mkdirp . sync ( dir ) ;
9596 stepNum = 0 ;
9697 error = null ;
You can’t perform that action at this time.
0 commit comments