mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +03:00
Fixed TS compilation in tests
This commit is contained in:
parent
60282281a3
commit
3e6aee47e5
4 changed files with 6 additions and 2 deletions
|
@ -11,11 +11,11 @@ import './CreateShortUrlResult.scss';
|
||||||
|
|
||||||
export interface CreateShortUrlResultProps extends ShortUrlCreation {
|
export interface CreateShortUrlResultProps extends ShortUrlCreation {
|
||||||
resetCreateShortUrl: () => void;
|
resetCreateShortUrl: () => void;
|
||||||
canBeClosed: boolean;
|
canBeClosed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CreateShortUrlResult = (useStateFlagTimeout: StateFlagTimeout) => (
|
const CreateShortUrlResult = (useStateFlagTimeout: StateFlagTimeout) => (
|
||||||
{ error, result, resetCreateShortUrl, canBeClosed }: CreateShortUrlResultProps,
|
{ error, result, resetCreateShortUrl, canBeClosed = false }: CreateShortUrlResultProps,
|
||||||
) => {
|
) => {
|
||||||
const [ showCopyTooltip, setShowCopyTooltip ] = useStateFlagTimeout();
|
const [ showCopyTooltip, setShowCopyTooltip ] = useStateFlagTimeout();
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ describe('<Paginator />', () => {
|
||||||
const paginator = {
|
const paginator = {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pagesCount: 5,
|
pagesCount: 5,
|
||||||
|
totalItems: 10,
|
||||||
};
|
};
|
||||||
const extraPagesPrevNext = 2;
|
const extraPagesPrevNext = 2;
|
||||||
const expectedItems = paginator.pagesCount + extraPagesPrevNext;
|
const expectedItems = paginator.pagesCount + extraPagesPrevNext;
|
||||||
|
|
|
@ -125,6 +125,7 @@ describe('shortUrlVisitsReducer', () => {
|
||||||
pagination: {
|
pagination: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pagesCount: 1,
|
pagesCount: 1,
|
||||||
|
totalItems: 1,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -144,6 +145,7 @@ describe('shortUrlVisitsReducer', () => {
|
||||||
pagination: {
|
pagination: {
|
||||||
currentPage: page,
|
currentPage: page,
|
||||||
pagesCount: expectedRequests,
|
pagesCount: expectedRequests,
|
||||||
|
totalItems: 1,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,7 @@ describe('tagVisitsReducer', () => {
|
||||||
pagination: {
|
pagination: {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pagesCount: 1,
|
pagesCount: 1,
|
||||||
|
totalItems: 1,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue