diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 18:09:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 18:09:34 +0000 |
commit | 141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch) | |
tree | 7e5a31fe9b0434fa0071cb5d09273669c3a8acab /spec/frontend/jira_import/components/jira_import_app_spec.js | |
parent | 209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff) | |
download | gitlab-ce-141902c04943d5fb43c014b8cf42af60a3bc0cdf.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/jira_import/components/jira_import_app_spec.js')
-rw-r--r-- | spec/frontend/jira_import/components/jira_import_app_spec.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/frontend/jira_import/components/jira_import_app_spec.js b/spec/frontend/jira_import/components/jira_import_app_spec.js new file mode 100644 index 00000000000..fb3ffe1ede3 --- /dev/null +++ b/spec/frontend/jira_import/components/jira_import_app_spec.js @@ -0,0 +1,38 @@ +import { shallowMount } from '@vue/test-utils'; +import JiraImportApp from '~/jira_import/components/jira_import_app.vue'; +import JiraImportSetup from '~/jira_import/components/jira_import_setup.vue'; + +describe('JiraImportApp', () => { + let wrapper; + + afterEach(() => { + wrapper.destroy(); + wrapper = null; + }); + + describe('set up Jira integration page', () => { + beforeEach(() => { + wrapper = shallowMount(JiraImportApp, { + propsData: { + isJiraConfigured: true, + projectPath: 'gitlab-org/gitlab-test', + setupIllustration: 'illustration.svg', + }, + }); + }); + + it('is shown when Jira integration is not configured', () => { + wrapper.setProps({ + isJiraConfigured: false, + }); + + return wrapper.vm.$nextTick(() => { + expect(wrapper.find(JiraImportSetup).exists()).toBe(true); + }); + }); + + it('is not shown when Jira integration is configured', () => { + expect(wrapper.find(JiraImportSetup).exists()).toBe(false); + }); + }); +}); |