mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-12 15:44:06 -08:00
fix(editor): Fix RunData non-binary pagination when binary data is present (#11309)
This commit is contained in:
parent
45274f2e7f
commit
901888d5b1
|
@ -1745,7 +1745,7 @@ export default defineComponent({
|
|||
v-if="
|
||||
hasNodeRun &&
|
||||
!hasRunError &&
|
||||
binaryData.length === 0 &&
|
||||
displayMode !== 'binary' &&
|
||||
dataCount > pageSize &&
|
||||
!isSchemaView &&
|
||||
!isArtificialRecoveredEventItem
|
||||
|
|
|
@ -154,6 +154,46 @@ describe('RunData', () => {
|
|||
expect(pinDataButton).toBeEnabled();
|
||||
});
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue