diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 00:09:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-31 00:09:38 +0300 |
commit | dd8c199e989482245c58ee49b5f7169bdd9073eb (patch) | |
tree | f70b1255763d003e855f9ea3dd73a6c14e2010ff /spec/frontend/environments/environment_form_spec.js | |
parent | cd99e8611a6df11975c227517892606440ad3ff6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/environments/environment_form_spec.js')
-rw-r--r-- | spec/frontend/environments/environment_form_spec.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/frontend/environments/environment_form_spec.js b/spec/frontend/environments/environment_form_spec.js index f1af08bcf32..b9b34bee80f 100644 --- a/spec/frontend/environments/environment_form_spec.js +++ b/spec/frontend/environments/environment_form_spec.js @@ -10,11 +10,14 @@ const DEFAULT_PROPS = { cancelPath: '/cancel', }; +const PROVIDE = { protectedEnvironmentSettingsPath: '/projects/not_real/settings/ci_cd' }; + describe('~/environments/components/form.vue', () => { let wrapper; const createWrapper = (propsData = {}) => mountExtended(EnvironmentForm, { + provide: PROVIDE, propsData: { ...DEFAULT_PROPS, ...propsData, @@ -31,7 +34,7 @@ describe('~/environments/components/form.vue', () => { }); it('links to documentation regarding environments', () => { - const link = wrapper.findByRole('link', { name: 'More information' }); + const link = wrapper.findByRole('link', { name: 'More information.' }); expect(link.attributes('href')).toBe('/help/ci/environments/index.md'); }); @@ -124,6 +127,10 @@ describe('~/environments/components/form.vue', () => { expect(urlInput.element.value).toBe(''); }); + + it('does not show protected environment documentation', () => { + expect(wrapper.findByRole('link', { name: 'Protected environments' }).exists()).toBe(false); + }); }); describe('when an existing environment is being edited', () => { |