diff --git a/packages/server/__mocks__/@budibase/pro.ts b/packages/server/__mocks__/@budibase/pro.ts new file mode 100644 index 0000000000..3f0c35d725 --- /dev/null +++ b/packages/server/__mocks__/@budibase/pro.ts @@ -0,0 +1,12 @@ +const actual = jest.requireActual("@budibase/pro") +const pro = { + ...actual, + features: { + ...actual.features, + isTriggerAutomationRunEnabled: () => { + return true + }, + }, +} + +export = pro diff --git a/packages/server/src/automations/tests/triggerAutomationRun.spec.ts b/packages/server/src/automations/tests/triggerAutomationRun.spec.ts index a9a85b4a84..f8cf647e79 100644 --- a/packages/server/src/automations/tests/triggerAutomationRun.spec.ts +++ b/packages/server/src/automations/tests/triggerAutomationRun.spec.ts @@ -34,7 +34,10 @@ describe("Test triggering an automation from another automation", () => { it("should fail gracefully if the automation id is incorrect", async () => { const inputs: any = { automation: { automationId: null, timeout: 12000 } } - const res = await setup.runStep(setup.actions.TRIGGER.stepId, inputs) + const res = await setup.runStep( + setup.actions.TRIGGER_AUTOMATION_RUN.stepId, + inputs + ) expect(res.success).toBe(false) }) })