From aad7cea10b5edc5c43ffa07b5b2b18e2e5458a4a Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Wed, 19 Jul 2023 11:53:07 +0200 Subject: [PATCH 1/4] fix: issue 3600 --- lib/recorder.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/recorder.js b/lib/recorder.js index b5761fa7f..f30e8f80c 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -94,7 +94,8 @@ module.exports = { oldPromises = []; tasks = []; this.session.running = false; - this.retries = []; + // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario + // this.retries = []; }, /** From d7de25ff54ef68ac4d02341995a4907272c81574 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Wed, 19 Jul 2023 11:56:17 +0200 Subject: [PATCH 2/4] fix: issue 3600 --- lib/recorder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/recorder.js b/lib/recorder.js index f30e8f80c..0e9098fc1 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -95,7 +95,7 @@ module.exports = { tasks = []; this.session.running = false; // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario - // this.retries = []; + this.retries = this.retries.length === 0 ? [] : this.retries; }, /** From abaccc6d5d5b76e12ae329042387269525cca045 Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Wed, 19 Jul 2023 11:58:23 +0200 Subject: [PATCH 3/4] fix: issue 3600 --- lib/recorder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/recorder.js b/lib/recorder.js index 0e9098fc1..0c6ee061e 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -95,7 +95,7 @@ module.exports = { tasks = []; this.session.running = false; // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario - this.retries = this.retries.length === 0 ? [] : this.retries; + if (this.retries.length === 0) this.retries = []; }, /** From 3c9fcd9a0a238d99a8f8f4660ba0a34d736be5fd Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Wed, 19 Jul 2023 13:18:01 +0200 Subject: [PATCH 4/4] fix: 3600 issue --- lib/recorder.js | 2 +- test/unit/plugin/retryFailedStep_test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/recorder.js b/lib/recorder.js index 0c6ee061e..f30e8f80c 100644 --- a/lib/recorder.js +++ b/lib/recorder.js @@ -95,7 +95,7 @@ module.exports = { tasks = []; this.session.running = false; // reset this retries makes the retryFailedStep plugin won't work if there is Before/BeforeSuit block due to retries is undefined on Scenario - if (this.retries.length === 0) this.retries = []; + // this.retries = []; }, /** diff --git a/test/unit/plugin/retryFailedStep_test.js b/test/unit/plugin/retryFailedStep_test.js index 7aba20c6c..721aeadd9 100644 --- a/test/unit/plugin/retryFailedStep_test.js +++ b/test/unit/plugin/retryFailedStep_test.js @@ -9,6 +9,7 @@ const recorder = require('../../../lib/recorder'); describe('retryFailedStep', () => { beforeEach(() => { + recorder.retries = []; container.clear({ mock: { _session: () => {},