diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-22 21:07:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-22 21:07:57 +0300 |
commit | 277c0c75bf32b40d882c35feafaae90f69c40dd9 (patch) | |
tree | 35f3969f59c1886fcfa71812cb2b942c46d9dffe /spec/frontend/boards | |
parent | 5e44c2ba46e780552317dec29e3b51282dfd5696 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards')
-rw-r--r-- | spec/frontend/boards/components/board_filtered_search_spec.js | 10 | ||||
-rw-r--r-- | spec/frontend/boards/mock_data.js | 14 |
2 files changed, 15 insertions, 9 deletions
diff --git a/spec/frontend/boards/components/board_filtered_search_spec.js b/spec/frontend/boards/components/board_filtered_search_spec.js index 6f17e4193a3..db94b392694 100644 --- a/spec/frontend/boards/components/board_filtered_search_spec.js +++ b/spec/frontend/boards/components/board_filtered_search_spec.js @@ -30,7 +30,7 @@ describe('BoardFilteredSearch', () => { { icon: 'labels', title: TOKEN_TITLE_LABEL, - type: 'label', + type: TOKEN_TYPE_LABEL, operators: [ { value: '=', description: 'is' }, { value: '!=', description: 'is not' }, @@ -43,7 +43,7 @@ describe('BoardFilteredSearch', () => { { icon: 'pencil', title: TOKEN_TITLE_AUTHOR, - type: 'author', + type: TOKEN_TYPE_AUTHOR, operators: [ { value: '=', description: 'is' }, { value: '!=', description: 'is not' }, @@ -109,7 +109,7 @@ describe('BoardFilteredSearch', () => { createComponent({ props: { eeFilters: { labelName: ['label'] } } }); expect(findFilteredSearch().props('initialFilterValue')).toEqual([ - { type: 'label', value: { data: 'label', operator: '=' } }, + { type: TOKEN_TYPE_LABEL, value: { data: 'label', operator: '=' } }, ]); }); }); @@ -158,7 +158,9 @@ describe('BoardFilteredSearch', () => { ['None', url('None')], ['Any', url('Any')], ])('sets the url param %s', (assigneeParam, expected) => { - const mockFilters = [{ type: 'assignee', value: { data: assigneeParam, operator: '=' } }]; + const mockFilters = [ + { type: TOKEN_TYPE_ASSIGNEE, value: { data: assigneeParam, operator: '=' } }, + ]; jest.spyOn(urlUtility, 'updateHistory'); findFilteredSearch().vm.$emit('onFilter', mockFilters); diff --git a/spec/frontend/boards/mock_data.js b/spec/frontend/boards/mock_data.js index 0cdab747a8d..30b2320097c 100644 --- a/spec/frontend/boards/mock_data.js +++ b/spec/frontend/boards/mock_data.js @@ -2,18 +2,22 @@ import { GlFilteredSearchToken } from '@gitlab/ui'; import { keyBy } from 'lodash'; import { ListType } from '~/boards/constants'; import { - OPERATORS_IS_NOT, OPERATORS_IS, + OPERATORS_IS_NOT, TOKEN_TITLE_ASSIGNEE, TOKEN_TITLE_AUTHOR, + TOKEN_TITLE_CONFIDENTIAL, TOKEN_TITLE_LABEL, TOKEN_TITLE_MILESTONE, + TOKEN_TITLE_MY_REACTION, TOKEN_TITLE_RELEASE, TOKEN_TITLE_TYPE, TOKEN_TYPE_ASSIGNEE, TOKEN_TYPE_AUTHOR, + TOKEN_TYPE_CONFIDENTIAL, TOKEN_TYPE_LABEL, TOKEN_TYPE_MILESTONE, + TOKEN_TYPE_MY_REACTION, TOKEN_TYPE_RELEASE, TOKEN_TYPE_TYPE, } from '~/vue_shared/components/filtered_search_bar/constants'; @@ -733,18 +737,18 @@ export const mockMoveData = { }; export const mockEmojiToken = { - type: 'my-reaction', + type: TOKEN_TYPE_MY_REACTION, icon: 'thumb-up', - title: 'My-Reaction', + title: TOKEN_TITLE_MY_REACTION, unique: true, token: EmojiToken, fetchEmojis: expect.any(Function), }; export const mockConfidentialToken = { - type: 'confidential', + type: TOKEN_TYPE_CONFIDENTIAL, icon: 'eye-slash', - title: 'Confidential', + title: TOKEN_TITLE_CONFIDENTIAL, unique: true, token: GlFilteredSearchToken, operators: OPERATORS_IS, |