diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /spec/frontend/groups_projects | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'spec/frontend/groups_projects')
-rw-r--r-- | spec/frontend/groups_projects/components/more_actions_dropdown_spec.js | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/spec/frontend/groups_projects/components/more_actions_dropdown_spec.js b/spec/frontend/groups_projects/components/more_actions_dropdown_spec.js index 1bcff8a44be..777190149d1 100644 --- a/spec/frontend/groups_projects/components/more_actions_dropdown_spec.js +++ b/spec/frontend/groups_projects/components/more_actions_dropdown_spec.js @@ -1,4 +1,8 @@ -import { GlDisclosureDropdownItem, GlDisclosureDropdown } from '@gitlab/ui'; +import { + GlDisclosureDropdownItem, + GlDisclosureDropdown, + GlDisclosureDropdownGroup, +} from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import moreActionsDropdown from '~/groups_projects/components/more_actions_dropdown.vue'; @@ -28,6 +32,7 @@ describe('moreActionsDropdown', () => { const showDropdown = () => { findDropdown().vm.$emit('show'); }; + const findDropdownGroup = () => wrapper.findComponent(GlDisclosureDropdownGroup); describe('copy id', () => { describe('project namespace type', () => { @@ -72,6 +77,29 @@ describe('moreActionsDropdown', () => { }); }); + describe('dropdown group', () => { + it('is not rendered if no path is set', () => { + createComponent({ + provideData: { + requestAccessPath: undefined, + leavePath: '', + withdrawPath: null, + }, + }); + + expect(findDropdownGroup().exists()).toBe(false); + }); + + it('is rendered if path is set', () => { + createComponent({ + provideData: { + requestAccessPath: 'path/to/request/access', + }, + }); + expect(findDropdownGroup().exists()).toBe(true); + }); + }); + describe('request access', () => { it('does not render request access link', async () => { createComponent(); |