mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
fix(editor): Fix RunData non-binary pagination when binary data is present (#11309)
This commit is contained in:
@@ -1745,7 +1745,7 @@ export default defineComponent({
|
|||||||
v-if="
|
v-if="
|
||||||
hasNodeRun &&
|
hasNodeRun &&
|
||||||
!hasRunError &&
|
!hasRunError &&
|
||||||
binaryData.length === 0 &&
|
displayMode !== 'binary' &&
|
||||||
dataCount > pageSize &&
|
dataCount > pageSize &&
|
||||||
!isSchemaView &&
|
!isSchemaView &&
|
||||||
!isArtificialRecoveredEventItem
|
!isArtificialRecoveredEventItem
|
||||||
|
|||||||
@@ -154,6 +154,46 @@ describe('RunData', () => {
|
|||||||
expect(pinDataButton).toBeEnabled();
|
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 = (
|
const render = (
|
||||||
outputData: unknown[],
|
outputData: unknown[],
|
||||||
displayMode: IRunDataDisplayMode,
|
displayMode: IRunDataDisplayMode,
|
||||||
|
|||||||
Reference in New Issue
Block a user