Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/frontend/@n8n/i18n/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2987,7 +2987,6 @@
"workflowRun.showError.productionActive": "Because of limitations in {nodeName}, n8n can't listen for test executions at the same time as listening for production ones",
"workflowRun.showError.title": "Problem running workflow",
"workflowRun.showError.payloadTooLarge": "Please execute the whole workflow, rather than just the node. (Existing execution data is too large.)",
"workflowRun.showError.resolveOutstandingIssues": "Please resolve outstanding issues before you activate it",
"workflowRun.showMessage.message": "Please fix them before executing",
"workflowRun.showMessage.title": "Workflow has issues",
"workflowSettings.callerIds": "IDs of workflows that can call this one",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,15 @@ describe('useRunWorkflow({ router })', () => {
expect(workflowsStore.executionWaitingForWebhook).toBe(false);
});

it('should prevent running a webhook-based workflow that has issues', async () => {
it('should not prevent running a webhook-based workflow that has issues', async () => {
const { runWorkflowApi } = useRunWorkflow({ router });
vi.mocked(workflowsStore).nodesIssuesExist = true;
vi.mocked(workflowsStore).runWorkflow.mockResolvedValue({
executionId: '123',
waitingForWebhook: true,
});

await expect(runWorkflowApi({} as IStartRunData)).rejects.toThrow(
'workflowRun.showError.resolveOutstandingIssues',
);
expect(async () => await runWorkflowApi({} as IStartRunData)).not.toThrow();

vi.mocked(workflowsStore).nodesIssuesExist = false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ export function useRunWorkflow(useRunWorkflowOpts: {
workflowState.setActiveExecutionId(response.executionId);
}

if (response.waitingForWebhook === true && workflowsStore.nodesIssuesExist) {
workflowState.setActiveExecutionId(undefined);
throw new Error(i18n.baseText('workflowRun.showError.resolveOutstandingIssues'));
}

if (response.waitingForWebhook === true) {
workflowsStore.executionWaitingForWebhook = true;
}
Expand Down
36 changes: 36 additions & 0 deletions packages/testing/playwright/tests/ui/16-webhook-node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,42 @@ test.describe('Webhook Trigger node', () => {
});
expect(successResponse.ok()).toBe(true);
});

test('CAT-1253-bug-cant-run-workflow-when-unconnected-nodes-have-errors', async ({ n8n }) => {
const webhookPath = nanoid();

// Add Webhook node
await n8n.canvas.addNode('Webhook');
await n8n.ndv.setupHelper.webhook({
httpMethod: 'GET',
path: webhookPath,
});
await n8n.ndv.close();

// Add No Operation node - it will connect automatically since Webhook node is in context
await n8n.canvas.nodeByName('Webhook').click();
await n8n.canvas.addNode('No Operation, do nothing', { closeNDV: true });

// Verify connection was created
await expect(n8n.canvas.nodeConnections()).toHaveCount(1);

// Add HTTP Request node (unconnected, which will have an error)
await n8n.canvas.deselectAll();
await n8n.canvas.addNode('HTTP Request', { closeNDV: true });

// Verify we now have 3 nodes but still only 1 connection
await expect(n8n.canvas.getCanvasNodes()).toHaveCount(3);
await expect(n8n.canvas.nodeConnections()).toHaveCount(1);

// Execute the workflow
await n8n.canvas.clickExecuteWorkflowButton();

// Assert that webhook is waiting for trigger
await expect(n8n.canvas.waitingForTriggerEvent()).toBeVisible();

// Assert that no error toast appeared
await expect(n8n.notifications.getErrorNotifications()).toHaveCount(0);
});
});

async function addEditFieldsNode(n8n: n8nPage): Promise<void> {
Expand Down
Loading