diff --git a/packages/server/src/automations/tests/trigger.spec.ts b/packages/server/src/automations/tests/trigger.spec.ts index 651d36bf4c..099ccc3bd5 100644 --- a/packages/server/src/automations/tests/trigger.spec.ts +++ b/packages/server/src/automations/tests/trigger.spec.ts @@ -21,14 +21,16 @@ describe("Test triggering an automation from another automation", () => { let automation = serverLogAutomation() let newAutomation = await config.createAutomation(automation) - const inputs: any = { automationId: newAutomation._id, timeout: 12000 } + const inputs: any = { + automation: { automationId: newAutomation._id, timeout: 12000 }, + } const res = await setup.runStep(setup.actions.TRIGGER.stepId, inputs) // Check if the SERVER_LOG step was successful expect(res.value[1].outputs.success).toBe(true) }) it("should fail gracefully if the automation id is incorrect", async () => { - const inputs: any = { automationId: null, timeout: 12000 } + const inputs: any = { automation: { automationId: null, timeout: 12000 } } const res = await setup.runStep(setup.actions.TRIGGER.stepId, inputs) expect(res.success).toBe(false) }) diff --git a/packages/server/src/tests/utilities/structures.ts b/packages/server/src/tests/utilities/structures.ts index eef97b1da8..5fc1d8b37a 100644 --- a/packages/server/src/tests/utilities/structures.ts +++ b/packages/server/src/tests/utilities/structures.ts @@ -192,30 +192,9 @@ export function serverLogAutomation(appId?: string): Automation { LOOPING: true, }, inputs: { - text: "sdfsdf", - }, - schema: { - inputs: { - properties: { - text: { - type: AutomationIOType.STRING, - title: "Text to log", - }, - }, - required: ["text"], - }, - outputs: { - properties: { - success: { - description: "Whether the action was successful", - }, - message: { - description: "What was output", - }, - }, - required: ["success", "message"], - }, + text: "log statement", }, + schema: BUILTIN_ACTION_DEFINITIONS.SERVER_LOG.schema, id: "y8lkZbeSe", type: AutomationStepType.ACTION, },