diff --git a/lib/plugin/retryFailedStep.js b/lib/plugin/retryFailedStep.js index 394fa4e5c..555ca683b 100644 --- a/lib/plugin/retryFailedStep.js +++ b/lib/plugin/retryFailedStep.js @@ -121,7 +121,7 @@ export default function (config) { enableRetry = true }) - event.dispatcher.on(event.step.passed, () => { + event.dispatcher.on(event.step.finished, () => { enableRetry = false }) diff --git a/test/unit/plugin/retryFailedStep_test.js b/test/unit/plugin/retryFailedStep_test.js index 812903665..75731f8a1 100644 --- a/test/unit/plugin/retryFailedStep_test.js +++ b/test/unit/plugin/retryFailedStep_test.js @@ -197,7 +197,7 @@ describe('retryFailedStep', () => { event.dispatcher.emit(event.step.started, { title: 'seeElement' }) expect(retryConfig.when(new Error()), "'seeElement' must not be ignored when only 'see' is configured").to.equal(true) - event.dispatcher.emit(event.step.passed, {}) + event.dispatcher.emit(event.step.finished, {}) event.dispatcher.emit(event.step.started, { title: 'see' }) expect(retryConfig.when(new Error()), "exact match 'see' must still be ignored").to.not.equal(true)