summaryrefslogtreecommitdiff
path: root/spec/frontend/crm/contacts_root_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/crm/contacts_root_spec.js')
-rw-r--r--spec/frontend/crm/contacts_root_spec.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/frontend/crm/contacts_root_spec.js b/spec/frontend/crm/contacts_root_spec.js
index 7aaaf480c44..ec7172434bf 100644
--- a/spec/frontend/crm/contacts_root_spec.js
+++ b/spec/frontend/crm/contacts_root_spec.js
@@ -87,7 +87,7 @@ describe('Customer relations contacts root app', () => {
editButtonLabel: 'Edit',
title: 'Customer relations contacts',
newContact: 'New contact',
- errorText: 'Something went wrong. Please try again.',
+ errorMsg: 'Something went wrong. Please try again.',
},
serverErrorMessage: '',
filterSearchKey: 'contacts',
@@ -117,6 +117,18 @@ describe('Customer relations contacts root app', () => {
expect(wrapper.text()).toContain('Something went wrong. Please try again.');
});
+
+ it('should be removed on error-alert-dismissed event', async () => {
+ mountComponent({ queryHandler: jest.fn().mockRejectedValue('ERROR') });
+ await waitForPromises();
+
+ expect(wrapper.text()).toContain('Something went wrong. Please try again.');
+
+ findTable().vm.$emit('error-alert-dismissed');
+ await waitForPromises();
+
+ expect(wrapper.text()).not.toContain('Something went wrong. Please try again.');
+ });
});
describe('on successful load', () => {