Commit d7e717de authored by Nick Kipling's avatar Nick Kipling

Updates to fix linting and tests

Remove lint exception rules from Nuget installation
Updated tests to support new component
Added changelog
parent c7f7a8e1
---
title: Added NuGet package installation instructions to package details page
merge_request: 24162
author:
type: added
......@@ -35,11 +35,9 @@ export default {
},
computed: {
nugetCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
return `nuget install ${this.packageEntity.name} -Source "GitLab"`;
},
setupCommand() {
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
return `nuget source Add -Name "GitLab" -Source "${this.registryUrl}" -UserName <your_username> -Password <your_token>`;
},
helpText() {
......
......@@ -10,7 +10,15 @@ import MavenInstallation from 'ee/packages/details/components/maven_installation
import * as SharedUtils from 'ee/packages/shared/utils';
import { TrackingActions } from 'ee/packages/shared/constants';
import ConanInstallation from 'ee/packages/details/components/conan_installation.vue';
import { conanPackage, mavenPackage, mavenFiles, npmPackage, npmFiles } from '../../mock_data';
import NugetInstallation from 'ee/packages/details/components/nuget_installation.vue';
import {
conanPackage,
mavenPackage,
mavenFiles,
npmPackage,
npmFiles,
nugetPackage,
} from '../../mock_data';
const localVue = createLocalVue();
localVue.use(Vuex);
......@@ -29,6 +37,8 @@ describe('PackagesApp', () => {
mavenHelpPath: 'foo',
conanPath: 'foo',
conanHelpPath: 'foo',
nugetPath: 'foo',
nugetHelpPath: 'foo',
};
function createComponent(packageEntity = mavenPackage, packageFiles = mavenFiles) {
......@@ -64,6 +74,7 @@ describe('PackagesApp', () => {
const npmInstallation = () => wrapper.find(NpmInstallation);
const mavenInstallation = () => wrapper.find(MavenInstallation);
const conanInstallation = () => wrapper.find(ConanInstallation);
const nugetInstallation = () => wrapper.find(NugetInstallation);
const allFileRows = () => wrapper.findAll('.js-file-row');
const firstFileDownloadLink = () => wrapper.find('.js-file-download');
const deleteButton = () => wrapper.find('.js-delete-button');
......@@ -199,4 +210,12 @@ describe('PackagesApp', () => {
expect(conanInstallation()).toExist();
});
it('renders package installation instructions for nuget packages', () => {
createComponent({
packageEntity: nugetPackage,
});
expect(nugetInstallation()).toExist();
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment