Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pipieline_stop_modal_spec.js « pipelines_list « components « pipelines « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 249126390f14f60bf2551ca66647898a82d6025f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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(`You’re about to stop pipeline #${mockPipelineHeader.id}.`);
  });
});