summaryrefslogtreecommitdiff
path: root/spec/frontend/super_sidebar
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-27 21:11:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-27 21:11:27 +0000
commit936139e69ce259283d02877bcb23ca77f65e2c60 (patch)
tree82c25a96104d635ef8716efbc4beb8ed729731ce /spec/frontend/super_sidebar
parent9beaa6816987274f2b870146ac649c970d69da24 (diff)
downloadgitlab-ce-936139e69ce259283d02877bcb23ca77f65e2c60.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/super_sidebar')
-rw-r--r--spec/frontend/super_sidebar/components/create_menu_spec.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/frontend/super_sidebar/components/create_menu_spec.js b/spec/frontend/super_sidebar/components/create_menu_spec.js
index 77a3dbd67c9..b24c6b8de7f 100644
--- a/spec/frontend/super_sidebar/components/create_menu_spec.js
+++ b/spec/frontend/super_sidebar/components/create_menu_spec.js
@@ -1,4 +1,4 @@
-import { GlDisclosureDropdown } from '@gitlab/ui';
+import { GlDisclosureDropdown, GlTooltip } from '@gitlab/ui';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { __ } from '~/locale';
import CreateMenu from '~/super_sidebar/components/create_menu.vue';
@@ -8,6 +8,7 @@ describe('CreateMenu component', () => {
let wrapper;
const findGlDisclosureDropdown = () => wrapper.findComponent(GlDisclosureDropdown);
+ const findGlTooltip = () => wrapper.findComponent(GlTooltip);
const createWrapper = () => {
wrapper = shallowMountExtended(CreateMenu, {
@@ -29,5 +30,10 @@ describe('CreateMenu component', () => {
it('passes the groups to the disclosure dropdown', () => {
expect(findGlDisclosureDropdown().props('items')).toBe(createNewMenuGroups);
});
+
+ it("sets the toggle ID and tooltip's target", () => {
+ expect(findGlDisclosureDropdown().props('toggleId')).toBe(wrapper.vm.$options.toggleId);
+ expect(findGlTooltip().props('target')).toBe(`#${wrapper.vm.$options.toggleId}`);
+ });
});
});