debian-mirror-gitlab/spec/frontend/pipelines/components/pipelines_list/pipieline_stop_modal_spec.js
2021-11-18 22:05:49 +05:30

27 lines
710 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { shallowMount } from '@vue/test-utils';
import { GlSprintf } from '@gitlab/ui';
import PipelineStopModal from '~/pipelines/components/pipelines_list/pipeline_stop_modal.vue';
import { mockPipelineHeader } from '../../mock_data';
describe('PipelineStopModal', () => {
let wrapper;
const createComponent = () => {
wrapper = shallowMount(PipelineStopModal, {
propsData: {
pipeline: mockPipelineHeader,
},
stubs: {
GlSprintf,
},
});
};
beforeEach(() => {
createComponent();
});
it('should render "stop pipeline" warning', () => {
expect(wrapper.text()).toMatch(`Youre about to stop pipeline #${mockPipelineHeader.id}.`);
});
});