diff options
Diffstat (limited to 'spec/frontend/admin/signup_restrictions/components/signup_form_spec.js')
-rw-r--r-- | spec/frontend/admin/signup_restrictions/components/signup_form_spec.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js b/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js index 411126d0c89..e6718f62b91 100644 --- a/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js +++ b/spec/frontend/admin/signup_restrictions/components/signup_form_spec.js @@ -1,4 +1,4 @@ -import { GlButton, GlModal } from '@gitlab/ui'; +import { GlButton, GlModal, GlLink } from '@gitlab/ui'; import { within } from '@testing-library/dom'; import { shallowMount, mount, createWrapper } from '@vue/test-utils'; import { stubComponent } from 'helpers/stub_component'; @@ -36,6 +36,7 @@ describe('Signup Form', () => { const findDenyListRawInputGroup = () => wrapper.findByTestId('domain-denylist-raw-input-group'); const findDenyListFileInputGroup = () => wrapper.findByTestId('domain-denylist-file-input-group'); const findUserCapInput = () => wrapper.findByTestId('user-cap-input'); + const findUserCapFormGroup = () => wrapper.findByTestId('user-cap-form-group'); const findModal = () => wrapper.findComponent(GlModal); afterEach(() => { @@ -214,4 +215,19 @@ describe('Signup Form', () => { }); }); }); + + describe('rendering help links within user cap description', () => { + beforeEach(() => { + mountComponent({ mountFn: mount }); + }); + + it('renders projectSharingHelpLink and groupSharingHelpLink', () => { + const [projectSharingLink, groupSharingLink] = findUserCapFormGroup().findAllComponents( + GlLink, + ).wrappers; + + expect(projectSharingLink.attributes('href')).toBe(mockData.projectSharingHelpLink); + expect(groupSharingLink.attributes('href')).toBe(mockData.groupSharingHelpLink); + }); + }); }); |