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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 21:09:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-09 21:09:34 +0300
commit141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch)
tree7e5a31fe9b0434fa0071cb5d09273669c3a8acab /spec/frontend/jira_import
parent209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/jira_import')
-rw-r--r--spec/frontend/jira_import/components/jira_import_app_spec.js38
-rw-r--r--spec/frontend/jira_import/components/jira_import_setup_spec.js28
2 files changed, 66 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);
+ });
+ });
+});
diff --git a/spec/frontend/jira_import/components/jira_import_setup_spec.js b/spec/frontend/jira_import/components/jira_import_setup_spec.js
new file mode 100644
index 00000000000..27366bd7e8a
--- /dev/null
+++ b/spec/frontend/jira_import/components/jira_import_setup_spec.js
@@ -0,0 +1,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');
+ });
+});