diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 18:07:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 18:07:50 +0300 |
commit | e38a99eb0725697297386dd0bb1045b1fd55493a (patch) | |
tree | e6298122cbb5418f59c140f4f9e303abdc0739b5 /spec/frontend | |
parent | 7c41737ae53e3a237f356480ae04ec3ba182447b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
3 files changed, 25 insertions, 13 deletions
diff --git a/spec/frontend/boards/components/board_filtered_search_spec.js b/spec/frontend/boards/components/board_filtered_search_spec.js index 1a07b9f0b78..f1113ee3073 100644 --- a/spec/frontend/boards/components/board_filtered_search_spec.js +++ b/spec/frontend/boards/components/board_filtered_search_spec.js @@ -3,7 +3,10 @@ import Vue from 'vue'; import Vuex from 'vuex'; import BoardFilteredSearch from '~/boards/components/board_filtered_search.vue'; import * as urlUtility from '~/lib/utils/url_utility'; -import { __ } from '~/locale'; +import { + TOKEN_TITLE_AUTHOR, + TOKEN_TITLE_LABEL, +} from '~/vue_shared/components/filtered_search_bar/constants'; import FilteredSearchBarRoot from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue'; import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label_token.vue'; @@ -17,7 +20,7 @@ describe('BoardFilteredSearch', () => { const tokens = [ { icon: 'labels', - title: __('Label'), + title: TOKEN_TITLE_LABEL, type: 'label', operators: [ { value: '=', description: 'is' }, @@ -30,7 +33,7 @@ describe('BoardFilteredSearch', () => { }, { icon: 'pencil', - title: __('Author'), + title: TOKEN_TITLE_AUTHOR, type: 'author', operators: [ { value: '=', description: 'is' }, diff --git a/spec/frontend/boards/mock_data.js b/spec/frontend/boards/mock_data.js index 17dcf5868a2..c99ae118db7 100644 --- a/spec/frontend/boards/mock_data.js +++ b/spec/frontend/boards/mock_data.js @@ -1,7 +1,14 @@ import { GlFilteredSearchToken } from '@gitlab/ui'; import { keyBy } from 'lodash'; import { ListType } from '~/boards/constants'; -import { __ } from '~/locale'; +import { + TOKEN_TITLE_ASSIGNEE, + TOKEN_TITLE_AUTHOR, + TOKEN_TITLE_LABEL, + TOKEN_TITLE_MILESTONE, + TOKEN_TITLE_RELEASE, + TOKEN_TITLE_TYPE, +} from '~/vue_shared/components/filtered_search_bar/constants'; import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue'; import EmojiToken from '~/vue_shared/components/filtered_search_bar/tokens/emoji_token.vue'; import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label_token.vue'; @@ -742,7 +749,7 @@ export const mockConfidentialToken = { export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedIn) => [ { icon: 'user', - title: __('Assignee'), + title: TOKEN_TITLE_ASSIGNEE, type: 'assignee', operators: [ { value: '=', description: 'is' }, @@ -755,7 +762,7 @@ export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedI }, { icon: 'pencil', - title: __('Author'), + title: TOKEN_TITLE_AUTHOR, type: 'author', operators: [ { value: '=', description: 'is' }, @@ -769,7 +776,7 @@ export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedI }, { icon: 'labels', - title: __('Label'), + title: TOKEN_TITLE_LABEL, type: 'label', operators: [ { value: '=', description: 'is' }, @@ -783,7 +790,7 @@ export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedI ...(isSignedIn ? [mockEmojiToken, mockConfidentialToken] : []), { icon: 'clock', - title: __('Milestone'), + title: TOKEN_TITLE_MILESTONE, symbol: '%', type: 'milestone', shouldSkipSort: true, @@ -793,7 +800,7 @@ export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedI }, { icon: 'issues', - title: __('Type'), + title: TOKEN_TITLE_TYPE, type: 'type', token: GlFilteredSearchToken, unique: true, @@ -804,7 +811,7 @@ export const mockTokens = (fetchLabels, fetchAuthors, fetchMilestones, isSignedI }, { type: 'release', - title: __('Release'), + title: TOKEN_TITLE_RELEASE, icon: 'rocket', token: ReleaseToken, fetchReleases: expect.any(Function), diff --git a/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js b/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js index d85574262fe..8eeba4d6274 100644 --- a/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/states/merge_checks_failed_spec.js @@ -1,5 +1,6 @@ import { shallowMount } from '@vue/test-utils'; import MergeChecksFailed from '~/vue_merge_request_widget/components/states/merge_checks_failed.vue'; +import { DETAILED_MERGE_STATUS } from '~/vue_merge_request_widget/constants'; let wrapper; @@ -15,9 +16,10 @@ describe('Merge request widget merge checks failed state component', () => { }); it.each` - mrState | displayText - ${{ approvals: true, isApproved: false }} | ${'approvalNeeded'} - ${{ detailedMergeStatus: 'BLOCKED_STATUS' }} | ${'blockingMergeRequests'} + mrState | displayText + ${{ approvals: true, isApproved: false }} | ${'approvalNeeded'} + ${{ detailedMergeStatus: DETAILED_MERGE_STATUS.BLOCKED_STATUS }} | ${'blockingMergeRequests'} + ${{ detailedMergeStatus: DETAILED_MERGE_STATUS.EXTERNAL_STATUS_CHECKS }} | ${'externalStatusChecksFailed'} `('display $displayText text for $mrState', ({ mrState, displayText }) => { factory({ mr: mrState }); |