Skip to content

Commit

Permalink
fix: UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Nov 6, 2023
1 parent 023bbc9 commit 06debd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/helper/Puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,11 @@ class Puppeteer extends Helper {
this.isAuthenticated = true;
}
}
const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
const dir = path.dirname(fileName);
if (!fileExists(dir)) fs.mkdirSync(dir);

if (this.options.trace) {
const fileName = `${`${global.output_dir}${path.sep}trace${path.sep}${uuidv4()}_${clearString(this.currentRunningTest.title)}`.slice(0, 245)}.json`;
const dir = path.dirname(fileName);
if (!fileExists(dir)) fs.mkdirSync(dir);
await this.page.tracing.start({ screenshots: true, path: fileName });
this.currentRunningTest.artifacts.trace = fileName;
}
Expand Down

0 comments on commit 06debd7

Please sign in to comment.