diff --git a/packages/editor-ui/src/components/__tests__/RunData.test.ts b/packages/editor-ui/src/components/__tests__/RunData.test.ts index c9ea213e8c7d1..9b4f49e89aba7 100644 --- a/packages/editor-ui/src/components/__tests__/RunData.test.ts +++ b/packages/editor-ui/src/components/__tests__/RunData.test.ts @@ -95,6 +95,46 @@ describe('RunData', () => { expect(getByTestId('ndv-binary-data_0')).toBeInTheDocument(); }); + it('should not render pagination on binary tab', async () => { + const { queryByTestId } = render( + Array.from({ length: 11 }).map((_, i) => ({ + json: { + data: { + id: i, + name: `Test ${i}`, + }, + }, + binary: { + data: { + a: 'b', + }, + }, + })), + 'binary', + ); + expect(queryByTestId('ndv-data-pagination')).not.toBeInTheDocument(); + }); + + it('should render pagination with binary data on non-binary tab', async () => { + const { getByTestId } = render( + Array.from({ length: 11 }).map((_, i) => ({ + json: { + data: { + id: i, + name: `Test ${i}`, + }, + }, + binary: { + data: { + a: 'b', + }, + }, + })), + 'json', + ); + expect(getByTestId('ndv-data-pagination')).toBeInTheDocument(); + }); + const render = (outputData: unknown[], displayMode: IRunDataDisplayMode) => { const pinia = createTestingPinia({ initialState: {