mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-12 10:33:49 +00:00
Improved DropdownBtn test
This commit is contained in:
@@ -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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user