summaryrefslogtreecommitdiff
path: root/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js
diff options
context:
space:
mode:
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.js13
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);
+ });
});