diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-28 21:26:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-28 21:26:46 +0300 |
commit | 5509e479900ee537980a126287c20327c41a61d6 (patch) | |
tree | 8272f06bd58b1518eca38975f95656ffc5497bd2 /spec/frontend/issues | |
parent | e0529f76a36026dc4bd51fbec1e5c52e7f3866e1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issues')
-rw-r--r-- | spec/frontend/issues/list/components/issues_list_app_spec.js | 22 | ||||
-rw-r--r-- | spec/frontend/issues/list/mock_data.js | 5 | ||||
-rw-r--r-- | spec/frontend/issues/list/utils_spec.js | 15 |
3 files changed, 6 insertions, 36 deletions
diff --git a/spec/frontend/issues/list/components/issues_list_app_spec.js b/spec/frontend/issues/list/components/issues_list_app_spec.js index d1b796c5aa6..076fdc4a991 100644 --- a/spec/frontend/issues/list/components/issues_list_app_spec.js +++ b/spec/frontend/issues/list/components/issues_list_app_spec.js @@ -661,25 +661,9 @@ describe('CE IssuesListApp component', () => { }); describe.each` - event | params - ${'next-page'} | ${{ - page_after: 'endcursor', - page_before: undefined, - first_page_size: 20, - last_page_size: undefined, - search: undefined, - sort: 'created_date', - state: 'opened', -}} - ${'previous-page'} | ${{ - page_after: undefined, - page_before: 'startcursor', - first_page_size: undefined, - last_page_size: 20, - search: undefined, - sort: 'created_date', - state: 'opened', -}} + event | params + ${'next-page'} | ${{ page_after: 'endcursor', page_before: undefined, first_page_size: 20, last_page_size: undefined }} + ${'previous-page'} | ${{ page_after: undefined, page_before: 'startcursor', first_page_size: undefined, last_page_size: 20 }} `('when "$event" event is emitted by IssuableList', ({ event, params }) => { beforeEach(async () => { wrapper = mountComponent({ diff --git a/spec/frontend/issues/list/mock_data.js b/spec/frontend/issues/list/mock_data.js index 0332f68ddb6..bd006a6b3ce 100644 --- a/spec/frontend/issues/list/mock_data.js +++ b/spec/frontend/issues/list/mock_data.js @@ -216,6 +216,7 @@ export const locationSearchWithSpecialValues = [ ].join('&'); export const filteredTokens = [ + { type: FILTERED_SEARCH_TERM, value: { data: 'find issues', operator: 'undefined' } }, { type: TOKEN_TYPE_AUTHOR, value: { data: 'homer', operator: OPERATOR_IS } }, { type: TOKEN_TYPE_AUTHOR, value: { data: 'marge', operator: OPERATOR_NOT } }, { type: TOKEN_TYPE_AUTHOR, value: { data: 'burns', operator: OPERATOR_OR } }, @@ -260,8 +261,6 @@ export const filteredTokens = [ { type: TOKEN_TYPE_ORGANIZATION, value: { data: '456', operator: OPERATOR_IS } }, { type: TOKEN_TYPE_HEALTH, value: { data: 'atRisk', operator: OPERATOR_IS } }, { type: TOKEN_TYPE_HEALTH, value: { data: 'onTrack', operator: OPERATOR_NOT } }, - { type: FILTERED_SEARCH_TERM, value: { data: 'find' } }, - { type: FILTERED_SEARCH_TERM, value: { data: 'issues' } }, ]; export const filteredTokensWithSpecialValues = [ @@ -278,6 +277,7 @@ export const filteredTokensWithSpecialValues = [ ]; export const apiParams = { + search: 'find issues', authorUsername: 'homer', assigneeUsernames: ['bart', 'lisa', '5'], milestoneTitle: ['season 3', 'season 4'], @@ -326,6 +326,7 @@ export const apiParamsWithSpecialValues = { }; export const urlParams = { + search: 'find issues', author_username: 'homer', 'not[author_username]': 'marge', 'or[author_username]': ['burns', 'smithers'], diff --git a/spec/frontend/issues/list/utils_spec.js b/spec/frontend/issues/list/utils_spec.js index e4ecdc6c29e..c14dcf96c98 100644 --- a/spec/frontend/issues/list/utils_spec.js +++ b/spec/frontend/issues/list/utils_spec.js @@ -21,7 +21,6 @@ import { getSortOptions, isSortKey, } from '~/issues/list/utils'; -import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants'; import { DEFAULT_PAGE_SIZE } from '~/vue_shared/issuable/list/constants'; describe('getInitialPageParams', () => { @@ -125,20 +124,6 @@ describe('getFilterTokens', () => { filteredTokensWithSpecialValues, ); }); - - it.each` - description | argument - ${'an undefined value'} | ${undefined} - ${'an irrelevant value'} | ${'?unrecognised=parameter'} - `('returns an empty filtered search term given $description', ({ argument }) => { - expect(getFilterTokens(argument)).toEqual([ - { - id: expect.any(String), - type: FILTERED_SEARCH_TERM, - value: { data: '' }, - }, - ]); - }); }); describe('convertToApiParams', () => { |