From 4c95b8f615865fcd430bca789b6d457c25018d60 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Mon, 29 Jul 2019 10:38:28 +0200 Subject: SONAR-12245 Fix broken test for extend profile form test --- .../quality-profiles/components/__tests__/ExtendProfileForm-test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/sonar-web/src') diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx index 27cebfc1b69..868e03c1b7b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx @@ -19,7 +19,7 @@ */ import { shallow } from 'enzyme'; import * as React from 'react'; -import { click } from 'sonar-ui-common/helpers/testUtils'; +import { click, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils'; import { changeProfileParent, createQualityProfile } from '../../../../api/quality-profiles'; import { mockQualityProfile } from '../../../../helpers/testMocks'; import ExtendProfileForm from '../ExtendProfileForm'; @@ -46,7 +46,7 @@ it('should correctly create a new profile and extend the existing one', async () wrapper.setState({ name }).update(); click(wrapper.find('SubmitButton')); - await Promise.resolve(setImmediate); + await waitAndUpdate(wrapper); const data = new FormData(); data.append('language', profile.language); -- cgit v1.2.3