From 2b73bf381e097a81e44b19554e9fc200d17356b7 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 16 Jan 2024 16:22:11 +0000 Subject: [PATCH] fix tests --- packages/server/src/automations/actions.ts | 4 ++-- .../src/automations/tests/triggerAutomationRun.spec.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/server/src/automations/actions.ts b/packages/server/src/automations/actions.ts index 90e1d10d2c..ac8a340e82 100644 --- a/packages/server/src/automations/actions.ts +++ b/packages/server/src/automations/actions.ts @@ -42,7 +42,7 @@ const ACTION_IMPLS: Record< FILTER: filter.run, QUERY_ROWS: queryRow.run, COLLECT: collect.run, - TRIGGER: triggerAutomationRun.run, + TRIGGER_AUTOMATION_RUN: triggerAutomationRun.run, // these used to be lowercase step IDs, maintain for backwards compat discord: discord.run, slack: slack.run, @@ -64,7 +64,7 @@ export const BUILTIN_ACTION_DEFINITIONS: Record = QUERY_ROWS: queryRow.definition, LOOP: loop.definition, COLLECT: collect.definition, - TRIGGER: triggerAutomationRun.definition, + TRIGGER_AUTOMATION_RUN: triggerAutomationRun.definition, // these used to be lowercase step IDs, maintain for backwards compat discord: discord.definition, slack: slack.definition, diff --git a/packages/server/src/automations/tests/triggerAutomationRun.spec.ts b/packages/server/src/automations/tests/triggerAutomationRun.spec.ts index 099ccc3bd5..a9a85b4a84 100644 --- a/packages/server/src/automations/tests/triggerAutomationRun.spec.ts +++ b/packages/server/src/automations/tests/triggerAutomationRun.spec.ts @@ -24,7 +24,10 @@ describe("Test triggering an automation from another automation", () => { const inputs: any = { automation: { automationId: newAutomation._id, timeout: 12000 }, } - const res = await setup.runStep(setup.actions.TRIGGER.stepId, inputs) + const res = await setup.runStep( + setup.actions.TRIGGER_AUTOMATION_RUN.stepId, + inputs + ) // Check if the SERVER_LOG step was successful expect(res.value[1].outputs.success).toBe(true) })