Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/pipelines/pipelines_artifacts_spec.js')
-rw-r--r--spec/frontend/pipelines/pipelines_artifacts_spec.js64
1 files changed, 0 insertions, 64 deletions
diff --git a/spec/frontend/pipelines/pipelines_artifacts_spec.js b/spec/frontend/pipelines/pipelines_artifacts_spec.js
deleted file mode 100644
index 1abc2887682..00000000000
--- a/spec/frontend/pipelines/pipelines_artifacts_spec.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import {
- GlDisclosureDropdown,
- GlDisclosureDropdownItem,
- GlDisclosureDropdownGroup,
- GlSprintf,
-} from '@gitlab/ui';
-import { shallowMount } from '@vue/test-utils';
-import PipelineArtifacts from '~/pipelines/components/pipelines_list/pipelines_artifacts.vue';
-
-describe('Pipelines Artifacts dropdown', () => {
- let wrapper;
-
- const artifacts = [
- {
- name: 'job my-artifact',
- path: '/download/path',
- },
- {
- name: 'job-2 my-artifact-2',
- path: '/download/path-two',
- },
- ];
- const pipelineId = 108;
-
- const createComponent = ({ mockArtifacts = artifacts } = {}) => {
- wrapper = shallowMount(PipelineArtifacts, {
- propsData: {
- pipelineId,
- artifacts: mockArtifacts,
- },
- stubs: {
- GlSprintf,
- GlDisclosureDropdown,
- GlDisclosureDropdownItem,
- GlDisclosureDropdownGroup,
- },
- });
- };
-
- const findGlDropdown = () => wrapper.findComponent(GlDisclosureDropdown);
- const findFirstGlDropdownItem = () => wrapper.findComponent(GlDisclosureDropdownItem);
-
- it('should render a dropdown with all the provided artifacts', () => {
- createComponent();
-
- const [{ items }] = findGlDropdown().props('items');
- expect(items).toHaveLength(artifacts.length);
- });
-
- it('should render a link with the provided path', () => {
- createComponent();
-
- expect(findFirstGlDropdownItem().props('item').href).toBe(artifacts[0].path);
- expect(findFirstGlDropdownItem().text()).toBe(artifacts[0].name);
- });
-
- describe('with no artifacts', () => {
- it('should not render the dropdown', () => {
- createComponent({ mockArtifacts: [] });
-
- expect(findGlDropdown().exists()).toBe(false);
- });
- });
-});