aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-07-29 10:38:28 +0200
committerSonarTech <sonartech@sonarsource.com>2019-07-29 20:21:10 +0200
commit4c95b8f615865fcd430bca789b6d457c25018d60 (patch)
tree59e69b299a7dd5795814ea9456529463db4b3fc0 /server/sonar-web/src
parent58391f645a8d3f218cdc41771b60dd976af780bf (diff)
downloadsonarqube-4c95b8f615865fcd430bca789b6d457c25018d60.tar.gz
sonarqube-4c95b8f615865fcd430bca789b6d457c25018d60.zip
SONAR-12245 Fix broken test for extend profile form test
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx4
1 files changed, 2 insertions, 2 deletions
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);