mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-16 12:33:48 +00:00
Added short URLs orderBy handling to the query state
This commit is contained in:
@@ -12,11 +12,12 @@ import Paginator from '../../src/short-urls/Paginator';
|
||||
import { ReachableServer } from '../../src/servers/data';
|
||||
import { ShortUrlListRouteParams } from '../../src/short-urls/helpers/hooks';
|
||||
import { Settings } from '../../src/settings/reducers/settings';
|
||||
import ShortUrlsFilteringBar from '../../src/short-urls/ShortUrlsFilteringBar';
|
||||
|
||||
describe('<ShortUrlsList />', () => {
|
||||
let wrapper: ShallowWrapper;
|
||||
const ShortUrlsTable = () => null;
|
||||
const SearchBar = () => null;
|
||||
const ShortUrlsFilteringBar = () => null;
|
||||
const listShortUrlsMock = jest.fn();
|
||||
const push = jest.fn();
|
||||
const shortUrlsList = Mock.of<ShortUrlsListModel>({
|
||||
@@ -31,7 +32,7 @@ describe('<ShortUrlsList />', () => {
|
||||
],
|
||||
},
|
||||
});
|
||||
const ShortUrlsList = shortUrlsListCreator(ShortUrlsTable, SearchBar);
|
||||
const ShortUrlsList = shortUrlsListCreator(ShortUrlsTable, ShortUrlsFilteringBar);
|
||||
const createWrapper = (defaultOrdering: ShortUrlsOrder = {}) => shallow(
|
||||
<ShortUrlsList
|
||||
{...Mock.of<MercureBoundProps>({ mercureInfo: { loading: true } })}
|
||||
@@ -56,7 +57,7 @@ describe('<ShortUrlsList />', () => {
|
||||
expect(wrapper.find(ShortUrlsTable)).toHaveLength(1);
|
||||
expect(wrapper.find(OrderingDropdown)).toHaveLength(1);
|
||||
expect(wrapper.find(Paginator)).toHaveLength(1);
|
||||
expect(wrapper.find(SearchBar)).toHaveLength(1);
|
||||
expect(wrapper.find(ShortUrlsFilteringBar)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('passes current query to paginator', () => {
|
||||
|
||||
Reference in New Issue
Block a user