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:
Diffstat (limited to 'spec/frontend/jira_import/components/jira_import_setup_spec.js')
-rw-r--r--spec/frontend/jira_import/components/jira_import_setup_spec.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/spec/frontend/jira_import/components/jira_import_setup_spec.js b/spec/frontend/jira_import/components/jira_import_setup_spec.js
index 27366bd7e8a..834c14b512e 100644
--- a/spec/frontend/jira_import/components/jira_import_setup_spec.js
+++ b/spec/frontend/jira_import/components/jira_import_setup_spec.js
@@ -1,9 +1,12 @@
+import { GlEmptyState } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import JiraImportSetup from '~/jira_import/components/jira_import_setup.vue';
describe('JiraImportSetup', () => {
let wrapper;
+ const getGlEmptyStateAttribute = attribute => wrapper.find(GlEmptyState).attributes(attribute);
+
beforeEach(() => {
wrapper = shallowMount(JiraImportSetup, {
propsData: {
@@ -17,12 +20,16 @@ describe('JiraImportSetup', () => {
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 illustration', () => {
+ expect(getGlEmptyStateAttribute('svgpath')).toBe('illustration.svg');
+ });
+
+ it('contains a description', () => {
+ const description = 'You will first need to set up Jira Integration to use this feature.';
+ expect(getGlEmptyStateAttribute('description')).toBe(description);
});
- it('contains button to set up Jira integration', () => {
- expect(wrapper.find('a').text()).toBe('Set up Jira Integration');
+ it('contains button text', () => {
+ expect(getGlEmptyStateAttribute('primarybuttontext')).toBe('Set up Jira Integration');
});
});