mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-10 18:27:25 +03:00
Fixed warnings in SortingDropdown
This commit is contained in:
parent
0c9434b555
commit
277069a0af
1 changed files with 7 additions and 6 deletions
|
@ -76,21 +76,22 @@ describe('<SortingDropdown />', () => {
|
|||
});
|
||||
|
||||
it.each([
|
||||
[{ isButton: false }, '>Order by<' ],
|
||||
[{ isButton: true }, '>Order by...<' ],
|
||||
[{ isButton: false }, <>Order by</> ],
|
||||
[{ isButton: true }, <>Order by...</> ],
|
||||
[
|
||||
{ isButton: true, orderField: 'foo', orderDir: 'ASC' as OrderDir },
|
||||
'Order by: "Foo" - "ASC"',
|
||||
'Order by: "Foo" - "ASC"',
|
||||
],
|
||||
[
|
||||
{ isButton: true, orderField: 'baz', orderDir: 'DESC' as OrderDir },
|
||||
'Order by: "Hello World" - "DESC"',
|
||||
'Order by: "Hello World" - "DESC"',
|
||||
],
|
||||
[{ isButton: true, orderField: 'baz' }, 'Order by: "Hello World" - "DESC"' ],
|
||||
[{ isButton: true, orderField: 'baz' }, 'Order by: "Hello World" - "DESC"' ],
|
||||
])('displays expected text in toggle', (props, expectedText) => {
|
||||
const wrapper = createWrapper(props);
|
||||
const toggle = wrapper.find(DropdownToggle);
|
||||
const [ children ] = (toggle.prop('children') as any[]).filter(Boolean);
|
||||
|
||||
expect(toggle.html()).toContain(expectedText);
|
||||
expect(children).toEqual(expectedText);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue