aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorphilippe-perrin-sonarsource <philippe.perrin@sonarsource.com>2019-08-30 18:08:11 +0200
committerSonarTech <sonartech@sonarsource.com>2019-09-03 20:21:05 +0200
commit9c59a4a57d2c064b65a8448ab99a305a62fbdd45 (patch)
tree67f08eb1c98d640893e759be176df9bd39b100b7 /server/sonar-web/src/main
parent95149b0143c4cd06225705a7bf232c3cface9081 (diff)
downloadsonarqube-9c59a4a57d2c064b65a8448ab99a305a62fbdd45.tar.gz
sonarqube-9c59a4a57d2c064b65a8448ab99a305a62fbdd45.zip
Tests fixup
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx
index 3bffac08ef7..7bf941c28aa 100644
--- a/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx
+++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/UserForm-test.tsx
@@ -19,6 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
+import { Alert } from 'sonar-ui-common/components/ui/Alert';
import { submit, waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
import { createUser, updateUser } from '../../../../api/users';
import { mockUser } from '../../../../helpers/testMocks';
@@ -47,11 +48,12 @@ it('should correctly show errors', async () => {
const wrapper = shallowRender();
submit(wrapper.dive().find('form'));
await waitAndUpdate(wrapper);
+
expect(
wrapper
.dive()
- .find('Alert')
- .dive()
+ .find(Alert)
+ .children()
.text()
).toMatch('default_error_message');
});
@@ -63,8 +65,8 @@ it('should correctly disable name and email fields for non-local users', () => {
expect(wrapper.find('Alert').exists()).toBe(true);
expect(
wrapper
- .find('Alert')
- .dive()
+ .find(Alert)
+ .children()
.text()
).toMatch('users.cannot_update_delegated_user');
});