summaryrefslogtreecommitdiff
path: root/spec/frontend/issuables_list/components/issuable_list_root_app_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/issuables_list/components/issuable_list_root_app_spec.js')
-rw-r--r--spec/frontend/issuables_list/components/issuable_list_root_app_spec.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/spec/frontend/issuables_list/components/issuable_list_root_app_spec.js b/spec/frontend/issuables_list/components/issuable_list_root_app_spec.js
index 899010bdb0f..aee49076b5d 100644
--- a/spec/frontend/issuables_list/components/issuable_list_root_app_spec.js
+++ b/spec/frontend/issuables_list/components/issuable_list_root_app_spec.js
@@ -16,10 +16,8 @@ describe('IssuableListRootApp', () => {
const findAlertLabel = () => wrapper.find(GlAlert).find(GlLabel);
const mountComponent = ({
- isFinishedAlertShowing = false,
- isInProgressAlertShowing = false,
- isInProgress = false,
- isFinished = false,
+ shouldShowFinishedAlert = false,
+ shouldShowInProgressAlert = false,
} = {}) =>
shallowMount(IssuableListRootApp, {
propsData: {
@@ -30,12 +28,11 @@ describe('IssuableListRootApp', () => {
},
data() {
return {
- isFinishedAlertShowing,
- isInProgressAlertShowing,
jiraImport: {
- isInProgress,
- isFinished,
+ importedIssuesCount: 1,
label,
+ shouldShowFinishedAlert,
+ shouldShowInProgressAlert,
},
};
},
@@ -57,8 +54,7 @@ describe('IssuableListRootApp', () => {
describe('when Jira import is in progress', () => {
it('shows an alert that tells the user a Jira import is in progress', () => {
wrapper = mountComponent({
- isInProgressAlertShowing: true,
- isInProgress: true,
+ shouldShowInProgressAlert: true,
});
expect(findAlert().text()).toBe(
@@ -70,14 +66,13 @@ describe('IssuableListRootApp', () => {
describe('when Jira import has finished', () => {
beforeEach(() => {
wrapper = mountComponent({
- isFinishedAlertShowing: true,
- isFinished: true,
+ shouldShowFinishedAlert: true,
});
});
describe('shows an alert', () => {
it('tells the user the Jira import has finished', () => {
- expect(findAlert().text()).toBe('Issues successfully imported with the label');
+ expect(findAlert().text()).toBe('1 issue successfully imported with the label');
});
it('contains the label title associated with the Jira import', () => {
@@ -105,8 +100,7 @@ describe('IssuableListRootApp', () => {
describe('alert message', () => {
it('is hidden when dismissed', () => {
wrapper = mountComponent({
- isInProgressAlertShowing: true,
- isInProgress: true,
+ shouldShowInProgressAlert: true,
});
expect(wrapper.contains(GlAlert)).toBe(true);