Skip to content

Commit

Permalink
fix: added missing unittest to prior PR
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanEnberg committed Jul 14, 2022
1 parent fb7ea43 commit 08d9c14
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apis/nucleus/src/components/listbox/__tests__/list-box.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ describe('<Listbox />', () => {
pages: [],
});
});

it('should use columns for horizontal layout', async () => {
args.listLayout = 'horizontal';
await render();
Expand All @@ -236,11 +237,20 @@ describe('<Listbox />', () => {
pages: [],
});
});

it('should set isLocked to true', async () => {
layout.qListObject.qDimensionInfo.qLocked = true;
await render();
const { itemData } = FixedSizeList.args[FixedSizeList.callCount - 1][0];
expect(itemData.isLocked).to.equal(true);
});

it('should never set count to lower then 1', async () => {
layout.qListObject.qSize.qcy = 0;
await render();

const { itemCount } = FixedSizeList.args[FixedSizeList.callCount - 1][0];
expect(itemCount).to.equal(1);
});
});
});

0 comments on commit 08d9c14

Please sign in to comment.