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 () => {