summaryrefslogtreecommitdiff
path: root/spec/frontend/packages
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 18:10:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 18:10:28 +0000
commitf69bc1dab50e86440bb4ffdc507ca5efd94bf459 (patch)
tree8b4d3da3106fee1271eece2dad1cc5e14052542b /spec/frontend/packages
parent81f257d72ef398933453d215019c850f57dae252 (diff)
downloadgitlab-ce-f69bc1dab50e86440bb4ffdc507ca5efd94bf459.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/packages')
-rw-r--r--spec/frontend/packages/details/components/app_spec.js5
-rw-r--r--spec/frontend/packages/details/components/installations_commands_spec.js4
-rw-r--r--spec/frontend/packages/mock_data.js14
3 files changed, 22 insertions, 1 deletions
diff --git a/spec/frontend/packages/details/components/app_spec.js b/spec/frontend/packages/details/components/app_spec.js
index 4b890f868f4..3132ec61942 100644
--- a/spec/frontend/packages/details/components/app_spec.js
+++ b/spec/frontend/packages/details/components/app_spec.js
@@ -1,5 +1,6 @@
import { GlEmptyState } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
+import { nextTick } from 'vue';
import Vuex from 'vuex';
import stubChildren from 'helpers/stub_children';
@@ -109,9 +110,11 @@ describe('PackagesApp', () => {
window.location = location;
});
- it('renders the app and displays the package title', () => {
+ it('renders the app and displays the package title', async () => {
createComponent();
+ await nextTick();
+
expect(packageTitle().exists()).toBe(true);
});
diff --git a/spec/frontend/packages/details/components/installations_commands_spec.js b/spec/frontend/packages/details/components/installations_commands_spec.js
index 065bf503585..164f9f69741 100644
--- a/spec/frontend/packages/details/components/installations_commands_spec.js
+++ b/spec/frontend/packages/details/components/installations_commands_spec.js
@@ -7,6 +7,7 @@ import MavenInstallation from '~/packages/details/components/maven_installation.
import NpmInstallation from '~/packages/details/components/npm_installation.vue';
import NugetInstallation from '~/packages/details/components/nuget_installation.vue';
import PypiInstallation from '~/packages/details/components/pypi_installation.vue';
+import TerraformInstallation from '~/packages_and_registries/infrastructure_registry/components/terraform_installation.vue';
import {
conanPackage,
@@ -15,6 +16,7 @@ import {
nugetPackage,
pypiPackage,
composerPackage,
+ terraformModule,
} from '../../mock_data';
describe('InstallationCommands', () => {
@@ -32,6 +34,7 @@ describe('InstallationCommands', () => {
const nugetInstallation = () => wrapper.find(NugetInstallation);
const pypiInstallation = () => wrapper.find(PypiInstallation);
const composerInstallation = () => wrapper.find(ComposerInstallation);
+ const terraformInstallation = () => wrapper.findComponent(TerraformInstallation);
afterEach(() => {
wrapper.destroy();
@@ -46,6 +49,7 @@ describe('InstallationCommands', () => {
${nugetPackage} | ${nugetInstallation}
${pypiPackage} | ${pypiInstallation}
${composerPackage} | ${composerInstallation}
+ ${terraformModule} | ${terraformInstallation}
`('renders', ({ packageEntity, selector }) => {
it(`${packageEntity.package_type} instructions exist`, () => {
createComponent({ packageEntity });
diff --git a/spec/frontend/packages/mock_data.js b/spec/frontend/packages/mock_data.js
index 46ccf5994b9..33b47cca68b 100644
--- a/spec/frontend/packages/mock_data.js
+++ b/spec/frontend/packages/mock_data.js
@@ -178,6 +178,20 @@ export const composerPackage = {
version: '1.0.0',
};
+export const terraformModule = {
+ created_at: '2015-12-10',
+ id: 2,
+ name: 'Test/system-22',
+ package_type: 'terraform_module',
+ project_path: 'foo/bar/baz',
+ projectPathName: 'foo/bar/baz',
+ project_id: 1,
+ updated_at: '2015-12-10',
+ version: '0.1',
+ versions: [],
+ _links,
+};
+
export const mockTags = [
{
name: 'foo-1',