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

demo_job_pill_spec.js « ui « drawer « components « pipeline_editor « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: edd2b45569a4c26f7ac5c3ca3909b219a6cabc6f (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 DemoJobPill from '~/pipeline_editor/components/drawer/ui/demo_job_pill.vue';

describe('Demo job pill', () => {
  let wrapper;
  const jobName = 'my-build-job';

  const createComponent = () => {
    wrapper = shallowMount(DemoJobPill, {
      propsData: {
        jobName,
      },
    });
  };

  beforeEach(() => {
    createComponent();
  });

  afterEach(() => {
    wrapper.destroy();
  });

  it('renders the jobName', () => {
    expect(wrapper.text()).toContain(jobName);
  });
});