fix tests oncemore
This commit is contained in:
parent
021eb58ea7
commit
72c2f6577c
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue