Skip to content

Commit

Permalink
fix: error when multiple steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Jun 7, 2024
1 parent d5ee538 commit dbff583
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/plugin/stepByStepReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ module.exports = function (config) {
currentTest = test;
});

event.dispatcher.on(event.step.failed, persistStep);

event.dispatcher.on(event.step.after, (step) => {
event.dispatcher.on(event.step.failed, (step) => {
recorder.add('screenshot of failed test', async () => persistStep(step), true);
});

event.dispatcher.on(event.step.after, persistStep);

event.dispatcher.on(event.test.passed, (test) => {
if (!config.deleteSuccessful) return persist(test);
// cleanup
Expand Down

0 comments on commit dbff583

Please sign in to comment.