mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): Show correct schema for output with falsy keys (#9556)
This commit is contained in:
@@ -84,4 +84,27 @@ describe('RunDataJsonSchema.vue', () => {
|
||||
});
|
||||
expect(container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('renders no data to show for data empty objects', () => {
|
||||
const renderResult = renderComponent({
|
||||
props: {
|
||||
data: [{}, {}],
|
||||
},
|
||||
});
|
||||
|
||||
expect(renderResult.getByText(/No data to show/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test.each([[[{ tx: false }, { tx: false }]], [[{ tx: '' }, { tx: '' }]], [[{ tx: [] }]]])(
|
||||
'renders schema instead of showing no data for %o',
|
||||
(data) => {
|
||||
const renderResult = renderComponent({
|
||||
props: {
|
||||
data,
|
||||
},
|
||||
});
|
||||
|
||||
expect(renderResult.queryByText(/No data to show/)).not.toBeInTheDocument();
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user