Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 21:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 21:08:05 +0300
commit6b5d8b17e28741bccf31029633cc5af7ceab1486 (patch)
tree38732dffc21a5084b5c3d49b56b81aa11b4e657e /spec/frontend/issues/list/utils_spec.js
parenta84995f457d775bb73598d4393c3bc99805d9b58 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issues/list/utils_spec.js')
-rw-r--r--spec/frontend/issues/list/utils_spec.js24
1 files changed, 17 insertions, 7 deletions
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 });
},
);
});