From 6b5d8b17e28741bccf31029633cc5af7ceab1486 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 18 May 2022 18:08:05 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/issues/list/utils_spec.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'spec/frontend/issues/list/utils_spec.js') diff --git a/spec/frontend/issues/list/utils_spec.js b/spec/frontend/issues/list/utils_spec.js index ce0477883d7..e8ffba9bc80 100644 --- a/spec/frontend/issues/list/utils_spec.js +++ b/spec/frontend/issues/list/utils_spec.js @@ -42,27 +42,37 @@ describe('getInitialPageParams', () => { 'returns the correct page params for sort key %s with afterCursor', (sortKey) => { const firstPageSize = sortKey === RELATIVE_POSITION_ASC ? PAGE_SIZE_MANUAL : PAGE_SIZE; + const lastPageSize = undefined; const afterCursor = 'randomCursorString'; const beforeCursor = undefined; - - expect(getInitialPageParams(sortKey, afterCursor, beforeCursor)).toEqual({ + const pageParams = getInitialPageParams( + sortKey, firstPageSize, + lastPageSize, afterCursor, - }); + beforeCursor, + ); + + expect(pageParams).toEqual({ firstPageSize, afterCursor }); }, ); it.each(Object.keys(urlSortParams))( 'returns the correct page params for sort key %s with beforeCursor', (sortKey) => { - const firstPageSize = sortKey === RELATIVE_POSITION_ASC ? PAGE_SIZE_MANUAL : PAGE_SIZE; + const firstPageSize = undefined; + const lastPageSize = PAGE_SIZE; const afterCursor = undefined; const beforeCursor = 'anotherRandomCursorString'; - - expect(getInitialPageParams(sortKey, afterCursor, beforeCursor)).toEqual({ + const pageParams = getInitialPageParams( + sortKey, firstPageSize, + lastPageSize, + afterCursor, beforeCursor, - }); + ); + + expect(pageParams).toEqual({ lastPageSize, beforeCursor }); }, ); }); -- cgit v1.2.3