mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 11:33:51 +00:00
Fixed TS compilation in tests
This commit is contained in:
@@ -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,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user