summaryrefslogtreecommitdiff
path: root/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js')
-rw-r--r--spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js b/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js
index f2fef6436a6..20acb0872e5 100644
--- a/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js
+++ b/spec/frontend/packages_and_registries/package_registry/components/details/pypi_installation_spec.js
@@ -1,9 +1,10 @@
-import { GlLink, GlSprintf } from '@gitlab/ui';
-import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
+import { GlSprintf } from '@gitlab/ui';
+import { mountExtended } from 'helpers/vue_test_utils_helper';
import { packageData } from 'jest/packages_and_registries/package_registry/mock_data';
import InstallationTitle from '~/packages_and_registries/package_registry/components/details/installation_title.vue';
import PypiInstallation from '~/packages_and_registries/package_registry/components/details/pypi_installation.vue';
import {
+ PERSONAL_ACCESS_TOKEN_HELP_URL,
PACKAGE_TYPE_PYPI,
TRACKING_ACTION_COPY_PIP_INSTALL_COMMAND,
TRACKING_ACTION_COPY_PYPI_SETUP_COMMAND,
@@ -24,11 +25,12 @@ password = <your personal access token>`;
const pipCommand = () => wrapper.findByTestId('pip-command');
const setupInstruction = () => wrapper.findByTestId('pypi-setup-content');
+ const findAccessTokenLink = () => wrapper.findByTestId('access-token-link');
const findInstallationTitle = () => wrapper.findComponent(InstallationTitle);
- const findSetupDocsLink = () => wrapper.findComponent(GlLink);
+ const findSetupDocsLink = () => wrapper.findByTestId('pypi-docs-link');
function createComponent() {
- wrapper = shallowMountExtended(PypiInstallation, {
+ wrapper = mountExtended(PypiInstallation, {
propsData: {
packageEntity,
},
@@ -78,6 +80,12 @@ password = <your personal access token>`;
});
});
+ it('has a link to personal access token docs', () => {
+ expect(findAccessTokenLink().attributes()).toMatchObject({
+ href: PERSONAL_ACCESS_TOKEN_HELP_URL,
+ });
+ });
+
it('has a link to the docs', () => {
expect(findSetupDocsLink().attributes()).toMatchObject({
href: PYPI_HELP_PATH,