diff options
Diffstat (limited to 'spec/frontend/ci/pipelines_page/components/pipeline_stop_modal_spec.js')
-rw-r--r-- | spec/frontend/ci/pipelines_page/components/pipeline_stop_modal_spec.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/ci/pipelines_page/components/pipeline_stop_modal_spec.js b/spec/frontend/ci/pipelines_page/components/pipeline_stop_modal_spec.js new file mode 100644 index 00000000000..4d78a923542 --- /dev/null +++ b/spec/frontend/ci/pipelines_page/components/pipeline_stop_modal_spec.js @@ -0,0 +1,27 @@ +import { shallowMount } from '@vue/test-utils'; +import { GlSprintf } from '@gitlab/ui'; +import { mockPipelineHeader } from 'jest/ci/pipeline_details/mock_data'; +import PipelineStopModal from '~/ci/pipelines_page/components/pipeline_stop_modal.vue'; + +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(`You’re about to stop pipeline #${mockPipelineHeader.id}.`); + }); +}); |