From a6022c11a5e1ab2826b4950d5fa23b2ef083e06f Mon Sep 17 00:00:00 2001 From: Naveen Kumar Date: Fri, 29 Nov 2024 16:52:55 +0530 Subject: [PATCH] fix loop not counting as step, test case failing --- .../server/src/automations/tests/scenarios/looping.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/automations/tests/scenarios/looping.spec.ts b/packages/server/src/automations/tests/scenarios/looping.spec.ts index 66614e716a..0baa69b3bc 100644 --- a/packages/server/src/automations/tests/scenarios/looping.spec.ts +++ b/packages/server/src/automations/tests/scenarios/looping.spec.ts @@ -168,7 +168,7 @@ describe("Loop automations", () => { .serverLog({ text: "{{steps.1.iterations}}" }) .run() - expect(results.steps[1].outputs.iterations).toBe(2) + expect(results.steps[0].outputs.iterations).toBe(2) }) it("should run an automation with loop and max iterations to ensure context correctness further down the tree", async () => { @@ -187,7 +187,7 @@ describe("Loop automations", () => { .serverLog({ text: "{{steps.1.iterations}}" }) .run() - expect(results.steps[2].outputs.message).toContain("- 2") + expect(results.steps[1].outputs.message).toContain("- 2") }) it("should run an automation where a loop is successfully run twice", async () => {