fix tests

This commit is contained in:
Peter Clement 2024-01-16 16:22:11 +00:00
parent 99ffe7db6b
commit 2b73bf381e
2 changed files with 6 additions and 3 deletions

View File

@ -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<string, AutomationStepSchema> =
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,

View File

@ -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)
})