Files
n8n/packages/testing/playwright/tests/e2e/regression/AI-1401-sub-nodes-input-panel.spec.ts
alighasami 3d5eaf9445
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
first commit
2026-03-17 16:22:57 +03:30

34 lines
1.4 KiB
TypeScript

import { test, expect } from '../../../fixtures/base';
test.describe('AI-1401 AI sub-nodes show node output with no path back in input', {
annotation: [
{ type: 'owner', description: 'AI' },
],
}, () => {
test('should show correct root node for nested sub-nodes in input panel', async ({ n8n }) => {
await n8n.start.fromImportedWorkflow('Test_ai_1401.json');
// Execute the workflow first to generate data
await n8n.canvas.executeNode('Edit Fields');
await n8n.notifications.waitForNotification('Node executed successfully');
for (const node of ['hackernews_top', 'hackernews_sub']) {
await n8n.canvas.openNode(node);
await expect(n8n.ndv.getContainer()).toBeVisible();
await expect(n8n.ndv.inputPanel.get()).toBeVisible();
// Switch to JSON mode within the mapping view
await n8n.ndv.inputPanel.switchDisplayMode('json');
// Verify the input node dropdown shows the correct parent nodes
const inputNodeSelect = n8n.ndv.inputPanel.get().locator('[data-test-id*="input-select"]');
await expect(inputNodeSelect).toBeVisible();
await inputNodeSelect.click();
await expect(n8n.page.getByRole('option', { name: 'Edit Fields' })).toBeVisible();
await expect(n8n.page.getByRole('option', { name: 'Manual Trigger' })).toBeVisible();
await expect(n8n.page.getByRole('option', { name: 'No Operation, do nothing' })).toBeHidden();
await n8n.ndv.clickBackToCanvasButton();
}
});
});