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.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/frontend/pipelines/pipelines_artifacts_spec.js b/spec/frontend/pipelines/pipelines_artifacts_spec.js
index f077833ae16..d4a2db08d97 100644
--- a/spec/frontend/pipelines/pipelines_artifacts_spec.js
+++ b/spec/frontend/pipelines/pipelines_artifacts_spec.js
@@ -1,24 +1,27 @@
-import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
-import { mount } from '@vue/test-utils';
+import { GlDropdown, GlDropdownItem, 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 createComponent = () => {
- wrapper = mount(PipelineArtifacts, {
+ wrapper = shallowMount(PipelineArtifacts, {
propsData: {
artifacts: [
{
- name: 'artifact',
+ name: 'job my-artifact',
path: '/download/path',
},
{
- name: 'artifact two',
+ name: 'job-2 my-artifact-2',
path: '/download/path-two',
},
],
},
+ stubs: {
+ GlSprintf,
+ },
});
};
@@ -39,8 +42,8 @@ describe('Pipelines Artifacts dropdown', () => {
});
it('should render a link with the provided path', () => {
- expect(findFirstGlDropdownItem().find('a').attributes('href')).toEqual('/download/path');
+ expect(findFirstGlDropdownItem().attributes('href')).toBe('/download/path');
- expect(findFirstGlDropdownItem().text()).toContain('artifact');
+ expect(findFirstGlDropdownItem().text()).toBe('Download job my-artifact artifact');
});
});