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-07-14 15:10:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-14 15:10:12 +0300
commit14a0edee5c04b04b5281f99ce7f6ba75b919dba1 (patch)
tree98484def7f8c4ad9c371664e40ddfef523340fad /spec/frontend/search/topbar/components
parent7a7f602c2689ef1d204976b23a8e89bdf927e8e2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/search/topbar/components')
-rw-r--r--spec/frontend/search/topbar/components/group_filter_spec.js5
-rw-r--r--spec/frontend/search/topbar/components/project_filter_spec.js5
2 files changed, 8 insertions, 2 deletions
diff --git a/spec/frontend/search/topbar/components/group_filter_spec.js b/spec/frontend/search/topbar/components/group_filter_spec.js
index 78d9efbd686..94882d181d3 100644
--- a/spec/frontend/search/topbar/components/group_filter_spec.js
+++ b/spec/frontend/search/topbar/components/group_filter_spec.js
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
-import { MOCK_GROUP, MOCK_QUERY } from 'jest/search/mock_data';
+import { MOCK_GROUP, MOCK_QUERY, CURRENT_SCOPE } from 'jest/search/mock_data';
import { visitUrl, setUrlParams } from '~/lib/utils/url_utility';
import { GROUPS_LOCAL_STORAGE_KEY } from '~/search/store/constants';
import GroupFilter from '~/search/topbar/components/group_filter.vue';
@@ -37,6 +37,7 @@ describe('GroupFilter', () => {
actions: actionSpies,
getters: {
frequentGroups: () => [],
+ currentScope: () => CURRENT_SCOPE,
},
});
@@ -89,6 +90,7 @@ describe('GroupFilter', () => {
[GROUP_DATA.queryParam]: null,
[PROJECT_DATA.queryParam]: null,
nav_source: null,
+ scope: CURRENT_SCOPE,
});
expect(visitUrl).toHaveBeenCalled();
@@ -109,6 +111,7 @@ describe('GroupFilter', () => {
[GROUP_DATA.queryParam]: MOCK_GROUP.id,
[PROJECT_DATA.queryParam]: null,
nav_source: null,
+ scope: CURRENT_SCOPE,
});
expect(visitUrl).toHaveBeenCalled();
diff --git a/spec/frontend/search/topbar/components/project_filter_spec.js b/spec/frontend/search/topbar/components/project_filter_spec.js
index 9eda34b1633..c25d2b94027 100644
--- a/spec/frontend/search/topbar/components/project_filter_spec.js
+++ b/spec/frontend/search/topbar/components/project_filter_spec.js
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import Vuex from 'vuex';
-import { MOCK_PROJECT, MOCK_QUERY } from 'jest/search/mock_data';
+import { MOCK_PROJECT, MOCK_QUERY, CURRENT_SCOPE } from 'jest/search/mock_data';
import { visitUrl, setUrlParams } from '~/lib/utils/url_utility';
import { PROJECTS_LOCAL_STORAGE_KEY } from '~/search/store/constants';
import ProjectFilter from '~/search/topbar/components/project_filter.vue';
@@ -37,6 +37,7 @@ describe('ProjectFilter', () => {
actions: actionSpies,
getters: {
frequentProjects: () => [],
+ currentScope: () => CURRENT_SCOPE,
},
});
@@ -88,6 +89,7 @@ describe('ProjectFilter', () => {
expect(setUrlParams).toHaveBeenCalledWith({
[PROJECT_DATA.queryParam]: null,
nav_source: null,
+ scope: CURRENT_SCOPE,
});
expect(visitUrl).toHaveBeenCalled();
});
@@ -107,6 +109,7 @@ describe('ProjectFilter', () => {
[GROUP_DATA.queryParam]: MOCK_PROJECT.namespace.id,
[PROJECT_DATA.queryParam]: MOCK_PROJECT.id,
nav_source: null,
+ scope: CURRENT_SCOPE,
});
expect(visitUrl).toHaveBeenCalled();
});