Implemented short URLs exporting

This commit is contained in:
Alejandro Celaya
2022-03-13 18:56:42 +01:00
parent e632c5b04f
commit 92ddcad753
23 changed files with 168 additions and 81 deletions

View File

@@ -20,7 +20,8 @@ jest.mock('react-router-dom', () => ({
describe('<ShortUrlsFilteringBar />', () => {
let wrapper: ShallowWrapper;
const ShortUrlsFilteringBar = filteringBarCreator(Mock.all<ColorGenerator>());
const ExportShortUrlsBtn = () => null;
const ShortUrlsFilteringBar = filteringBarCreator(Mock.all<ColorGenerator>(), ExportShortUrlsBtn);
const navigate = jest.fn();
const handleOrderBy = jest.fn();
const now = new Date();
@@ -48,6 +49,7 @@ describe('<ShortUrlsFilteringBar />', () => {
expect(wrapper.find(SearchField)).toHaveLength(1);
expect(wrapper.find(DateRangeSelector)).toHaveLength(1);
expect(wrapper.find(OrderingDropdown)).toHaveLength(1);
expect(wrapper.find(ExportShortUrlsBtn)).toHaveLength(1);
});
it.each([

View File

@@ -33,6 +33,7 @@ describe('<ShortUrlsList />', () => {
tags: [ 'test tag' ],
}),
],
pagination: {},
},
});
const ShortUrlsList = shortUrlsListCreator(ShortUrlsTable, ShortUrlsFilteringBar);