fix(core): Fix supportedNodes for non-lazy loaded community packages (no-changelog) (#11329)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-10 14:48:39 +01:00
committed by GitHub
parent 1c52bf9362
commit 2d36b42798
28 changed files with 1435 additions and 586 deletions

View File

@@ -528,8 +528,28 @@ describe('POST /workflows/:id/activate', () => {
expect(response.statusCode).toBe(404);
});
test('should fail due to trying to activate a workflow without any nodes', async () => {
const workflow = await createWorkflow({ nodes: [] }, owner);
const response = await authOwnerAgent.post(`/workflows/${workflow.id}/activate`);
expect(response.statusCode).toBe(400);
});
test('should fail due to trying to activate a workflow without a trigger', async () => {
const workflow = await createWorkflow({}, owner);
const workflow = await createWorkflow(
{
nodes: [
{
id: 'uuid-1234',
name: 'Start',
parameters: {},
position: [-20, 260],
type: 'n8n-nodes-base.start',
typeVersion: 1,
},
],
},
owner,
);
const response = await authOwnerAgent.post(`/workflows/${workflow.id}/activate`);
expect(response.statusCode).toBe(400);
});