From 29f6c0bff81cae77435342e46d1f439ac16a57d1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Sep 2022 18:13:03 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/crm/contacts_root_spec.js | 14 +++++++++++++- spec/frontend/crm/organizations_root_spec.js | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'spec/frontend/crm') 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', () => { diff --git a/spec/frontend/crm/organizations_root_spec.js b/spec/frontend/crm/organizations_root_spec.js index a0b56596177..1fcf6aa8f50 100644 --- a/spec/frontend/crm/organizations_root_spec.js +++ b/spec/frontend/crm/organizations_root_spec.js @@ -91,7 +91,7 @@ describe('Customer relations organizations root app', () => { editButtonLabel: 'Edit', title: 'Customer relations organizations', newOrganization: 'New organization', - errorText: 'Something went wrong. Please try again.', + errorMsg: 'Something went wrong. Please try again.', }, serverErrorMessage: '', filterSearchKey: 'organizations', -- cgit v1.2.3