Files
n8n-enterprise-unlocked/packages/testing/playwright/tests/ui/2230-ADO-ndv-reset-data-pagination.spec.ts
shortstacked 7dd89d77d9 test: Migrate small Cypress tests to Playwright (#18922)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-29 09:04:47 +01:00

36 lines
1.1 KiB
TypeScript

import { test, expect } from '../../fixtures/base';
test.describe('ADO-2230 NDV Pagination Reset', () => {
test('should reset pagination if data size changes to less than current page', async ({
n8n,
}) => {
await n8n.start.fromImportedWorkflow('NDV-debug-generate-data.json');
await n8n.canvas.openNode('DebugHelper');
await n8n.ndv.execute();
await n8n.notifications.quickCloseAll();
const outputPagination = n8n.ndv.getOutputPagination();
await expect(outputPagination).toBeVisible();
await expect(n8n.ndv.getOutputPaginationPages()).toHaveCount(5);
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).not.toBeEmpty();
const firstPageContent = await n8n.ndv.getOutputPageContent(0, 0);
await n8n.ndv.navigateToOutputPage(4);
const fourthPageContent = await n8n.ndv.getOutputPageContent(0, 0);
expect(fourthPageContent).not.toBe(firstPageContent);
await n8n.ndv.setParameterInputValue('randomDataCount', '20');
await n8n.ndv.execute();
await n8n.notifications.quickCloseAll();
await expect(n8n.ndv.getOutputPaginationPages()).toHaveCount(2);
await expect(n8n.ndv.getOutputTbodyCell(0, 0)).not.toBeEmpty();
});
});