Skip to content

Commit

Permalink
test: add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielS-Qlik committed May 2, 2023
1 parent acf4d97 commit fb8437e
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -285,5 +285,13 @@ describe('<Listbox />', () => {
const listRows = renderer.root.findAllByProps({ className: 'a-value-row' });
expect(listRows).toHaveLength(1);
});

test('should not render a disclaimer when list count is 0 and qCardinal is 0', async () => {
layout.qListObject.qSize.qcy = 0;
layout.qListObject.qDimensionInfo.qCardinal = 0;
await render();
const disclaimers = renderer.root.findAllByType(ListBoxDisclaimer);
expect(disclaimers).toHaveLength(0);
});
});
});

0 comments on commit fb8437e

Please sign in to comment.