test: 14-mapping tests migration (#18858)

This commit is contained in:
shortstacked
2025-08-28 09:07:14 +01:00
committed by GitHub
parent 4bbf7cb749
commit ff56c95605
17 changed files with 807 additions and 440 deletions

View File

@@ -39,7 +39,7 @@ test.describe('Data pinning', () => {
await n8n.ndv.execute();
await expect(n8n.ndv.getOutputPanel()).toBeVisible();
const prevValue = await n8n.ndv.getOutputTbodyCell(1, 0).textContent();
const prevValue = await n8n.ndv.getOutputTbodyCell(0, 0).textContent();
await n8n.ndv.togglePinData();
await n8n.ndv.close();
@@ -48,7 +48,7 @@ test.describe('Data pinning', () => {
await n8n.canvas.clickExecuteWorkflowButton();
await n8n.canvas.openNode(NODES.SCHEDULE_TRIGGER);
await expect(n8n.ndv.getOutputTbodyCell(1, 0)).toHaveText(prevValue ?? '');
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).toHaveText(prevValue ?? '');
});
test('should be able to set custom pinned data', async ({ n8n }) => {
@@ -63,14 +63,14 @@ test.describe('Data pinning', () => {
await expect(n8n.ndv.getOutputTableRows()).toHaveCount(2);
await expect(n8n.ndv.getOutputTableHeaders()).toHaveCount(2);
await expect(n8n.ndv.getOutputTableHeaders().first()).toContainText('test');
await expect(n8n.ndv.getOutputTbodyCell(1, 0)).toContainText('1');
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).toContainText('1');
await n8n.ndv.close();
await n8n.canvas.clickSaveWorkflowButton();
await n8n.canvas.openNode(NODES.SCHEDULE_TRIGGER);
await expect(n8n.ndv.getOutputTableHeaders().first()).toContainText('test');
await expect(n8n.ndv.getOutputTbodyCell(1, 0)).toContainText('1');
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).toContainText('1');
});
test('should display pin data edit button for Webhook node', async ({ n8n }) => {
@@ -102,7 +102,7 @@ test.describe('Data pinning', () => {
await n8n.canvas.openNode('Edit Fields1');
await expect(n8n.ndv.getOutputTableHeaders().first()).toContainText('test');
await expect(n8n.ndv.getOutputTbodyCell(1, 0)).toContainText('1');
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).toContainText('1');
});
});
@@ -212,10 +212,7 @@ test.describe('Data pinning', () => {
}) => {
await setupRequirements(webhookTestRequirements);
await expect(n8n.canvas.getWorkflowSaveButton()).toContainText('Saved');
await n8n.page.waitForTimeout(500);
await n8n.canvas.activateWorkflow();
await n8n.page.waitForTimeout(500);
const webhookUrl = '/webhook/b0d79ddb-df2d-49b1-8555-9fa2b482608f';
const response = await n8n.ndv.makeWebhookRequest(webhookUrl);
expect(response.status(), 'Webhook response is: ' + (await response.text())).toBe(200);