diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 21:11:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 21:11:11 +0300 |
commit | 5b0916450cebb6a88bd651fd0579737541c355c8 (patch) | |
tree | 3a788fd8e2ef18b1c6e06d222e84bb5d84307870 /spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js | |
parent | 78aaabb87f180e93fa53aba407a0eef1e12a7a56 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js')
-rw-r--r-- | spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js index 4e79f62ce81..57a864cb2c4 100644 --- a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js +++ b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js @@ -1,3 +1,4 @@ +import { GlLink } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import Component from '~/projects/pipelines/charts/components/statistics_list.vue'; import { counts } from '../mock_data'; @@ -5,8 +6,15 @@ import { counts } from '../mock_data'; describe('StatisticsList', () => { let wrapper; + const failedPipelinesLink = '/flightjs/Flight/-/pipelines?page=1&scope=all&status=failed'; + + const findFailedPipelinesLink = () => wrapper.findComponent(GlLink); + beforeEach(() => { wrapper = shallowMount(Component, { + provide: { + failedPipelinesLink, + }, propsData: { counts, }, @@ -15,10 +23,13 @@ describe('StatisticsList', () => { afterEach(() => { wrapper.destroy(); - wrapper = null; }); it('displays the counts data with labels', () => { expect(wrapper.element).toMatchSnapshot(); }); + + it('displays failed pipelines link', () => { + expect(findFailedPipelinesLink().attributes('href')).toBe(failedPipelinesLink); + }); }); |