mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
Improved DropdownBtn test
This commit is contained in:
parent
c4ed838510
commit
5bd57e71fd
1 changed files with 11 additions and 0 deletions
|
@ -38,4 +38,15 @@ describe('<DropdownBtn />', () => {
|
||||||
|
|
||||||
expect(toggle.prop('className')?.trim()).toEqual(expectedClasses);
|
expect(toggle.prop('className')?.trim()).toEqual(expectedClasses);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
[ 100, { minWidth: '100px' }],
|
||||||
|
[ 250, { minWidth: '250px' }],
|
||||||
|
[ undefined, {}],
|
||||||
|
])('renders proper styles when minWidth is provided', (minWidth, expectedStyle) => {
|
||||||
|
const wrapper = createWrapper({ text: '', minWidth });
|
||||||
|
const style = wrapper.find(DropdownMenu).prop('style');
|
||||||
|
|
||||||
|
expect(style).toEqual(expectedStyle);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue