diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-28 21:15:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-28 21:15:00 +0300 |
commit | 14059114eb35b29cf83aa1b715158c96c55ab388 (patch) | |
tree | b9b96e6bb66e3b1caf900bdce664a234087a4848 /spec/frontend/packages_and_registries | |
parent | ee7db70e1185876e97eca97ce8efabfc64c360b9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/packages_and_registries')
-rw-r--r-- | spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js b/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js index d57077b31c8..8a66a685733 100644 --- a/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js +++ b/spec/frontend/packages_and_registries/settings/group/components/packages_forwarding_settings_spec.js @@ -1,12 +1,13 @@ import Vue from 'vue'; -import { GlButton } from '@gitlab/ui'; +import { GlButton, GlLink, GlSprintf } from '@gitlab/ui'; import VueApollo from 'vue-apollo'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; +import { s__ } from '~/locale'; import component from '~/packages_and_registries/settings/group/components/packages_forwarding_settings.vue'; import { - PACKAGE_FORWARDING_SETTINGS_DESCRIPTION, + REQUEST_FORWARDING_HELP_PAGE_PATH, PACKAGE_FORWARDING_SETTINGS_HEADER, } from '~/packages_and_registries/settings/group/constants'; @@ -60,6 +61,7 @@ describe('Packages Forwarding Settings', () => { forwardSettings, }, stubs: { + GlSprintf, SettingsBlock, }, }); @@ -72,6 +74,7 @@ describe('Packages Forwarding Settings', () => { const findMavenForwardingSettings = () => wrapper.findByTestId('maven'); const findNpmForwardingSettings = () => wrapper.findByTestId('npm'); const findPyPiForwardingSettings = () => wrapper.findByTestId('pypi'); + const findRequestForwardingDocsLink = () => wrapper.findComponent(GlLink); const fillApolloCache = () => { apolloProvider.defaultClient.cache.writeQuery({ @@ -111,8 +114,18 @@ describe('Packages Forwarding Settings', () => { it('has the correct description text', () => { mountComponent(); - expect(findDescription().text()).toMatchInterpolatedText( - PACKAGE_FORWARDING_SETTINGS_DESCRIPTION, + expect(findDescription().text()).toBe( + s__( + 'PackageRegistry|Forward package requests to a public registry if the packages are not found in the GitLab package registry.', + ), + ); + }); + + it('has the right help link', () => { + mountComponent(); + + expect(findRequestForwardingDocsLink().attributes('href')).toBe( + REQUEST_FORWARDING_HELP_PAGE_PATH, ); }); |