summaryrefslogtreecommitdiff
path: root/spec/frontend/jira_import/components/jira_import_setup_spec.js
blob: 27366bd7e8a7b5df9a95f695f82e85462785e719 (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
28
import { shallowMount } from '@vue/test-utils';
import JiraImportSetup from '~/jira_import/components/jira_import_setup.vue';

describe('JiraImportSetup', () => {
  let wrapper;

  beforeEach(() => {
    wrapper = shallowMount(JiraImportSetup, {
      propsData: {
        illustration: 'illustration.svg',
      },
    });
  });

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

  it('displays a message to the user', () => {
    const message = 'You will first need to set up Jira Integration to use this feature.';
    expect(wrapper.find('p').text()).toBe(message);
  });

  it('contains button to set up Jira integration', () => {
    expect(wrapper.find('a').text()).toBe('Set up Jira Integration');
  });
});