Browse Source

SONAR-12245 Fix broken test for extend profile form test

tags/8.0
Grégoire Aubert 4 years ago
parent
commit
4c95b8f615

+ 2
- 2
server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ExtendProfileForm-test.tsx View File

@@ -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);

Loading…
Cancel
Save