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

jira_issues_spec.js « sections « components « edit « integrations « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7c1cc2a03f2cfc87938c4ea473536704774fb49 (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
29
30
31
32
33
34
import { shallowMount } from '@vue/test-utils';

import IntegrationSectionJiraIssue from '~/integrations/edit/components/sections/jira_issues.vue';
import JiraIssuesFields from '~/integrations/edit/components/jira_issues_fields.vue';
import { createStore } from '~/integrations/edit/store';

import { mockIntegrationProps } from '../../mock_data';

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

  const createComponent = () => {
    const store = createStore({
      customState: { ...mockIntegrationProps },
    });
    wrapper = shallowMount(IntegrationSectionJiraIssue, {
      store,
    });
  };

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

  const findJiraIssuesFields = () => wrapper.findComponent(JiraIssuesFields);

  describe('template', () => {
    it('renders JiraIssuesFields', () => {
      createComponent();

      expect(findJiraIssuesFields().exists()).toBe(true);
    });
  });
});