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>2023-08-11 12:10:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-11 12:10:29 +0300
commitf91915aadb90fcf2fdf6326ca9160defa4217fea (patch)
treeba5c84e1b56f2c1fa87ecd955c71acfd0d0be129 /spec/frontend/ci/runner
parent0852a74a60390025793a4d688826d18016612e1e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci/runner')
-rw-r--r--spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js b/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js
index e9f2e888b9a..91d2a20ec8a 100644
--- a/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js
+++ b/spec/frontend/ci/runner/components/search_tokens/tag_token_spec.js
@@ -6,7 +6,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import { createAlert } from '~/alert';
import axios from '~/lib/utils/axios_utils';
import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status';
-import TagToken, { TAG_SUGGESTIONS_PATH } from '~/ci/runner/components/search_tokens/tag_token.vue';
+import TagToken from '~/ci/runner/components/search_tokens/tag_token.vue';
import { OPERATORS_IS } from '~/vue_shared/components/filtered_search_bar/constants';
import { getRecentlyUsedSuggestions } from '~/vue_shared/components/filtered_search_bar/filtered_search_utils';
@@ -45,6 +45,8 @@ const mockTagTokenConfig = {
operators: OPERATORS_IS,
};
+const mockTagSuggestionsPath = '/path/runners/tag_list';
+
describe('TagToken', () => {
let mock;
let wrapper;
@@ -59,7 +61,8 @@ describe('TagToken', () => {
},
provide: {
portalName: 'fake target',
- alignSuggestions: function fakeAlignSuggestions() {},
+ tagSuggestionsPath: mockTagSuggestionsPath,
+ alignSuggestions: function fakeAligxnSuggestions() {},
filteredSearchSuggestionListInstance: {
register: jest.fn(),
unregister: jest.fn(),
@@ -80,9 +83,9 @@ describe('TagToken', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
- mock.onGet(TAG_SUGGESTIONS_PATH, { params: { search: '' } }).reply(HTTP_STATUS_OK, mockTags);
+ mock.onGet(mockTagSuggestionsPath, { params: { search: '' } }).reply(HTTP_STATUS_OK, mockTags);
mock
- .onGet(TAG_SUGGESTIONS_PATH, { params: { search: mockSearchTerm } })
+ .onGet(mockTagSuggestionsPath, { params: { search: mockSearchTerm } })
.reply(HTTP_STATUS_OK, mockTagsFiltered);
getRecentlyUsedSuggestions.mockReturnValue([]);
@@ -163,7 +166,7 @@ describe('TagToken', () => {
describe('when suggestions cannot be loaded', () => {
beforeEach(async () => {
mock
- .onGet(TAG_SUGGESTIONS_PATH, { params: { search: '' } })
+ .onGet(mockTagSuggestionsPath, { params: { search: '' } })
.reply(HTTP_STATUS_INTERNAL_SERVER_ERROR);
createComponent();