Fixed addDisabledUser test

This commit is contained in:
Petr Mensik 2015-06-02 15:37:19 +02:00
parent ea544c639e
commit 5fe0406ec9

View file

@ -100,13 +100,16 @@ public class AddNewUserTest extends AbstractKeyCloakTest<UserPage> {
@Test
public void addDisabledUser() {
page.addUser(TEST_USER1);
User disabledUser = new User(TEST_USER1);
disabledUser.setUserEnabled(false);
disabledUser.setUserName("disabled_user");
page.addUser(disabledUser);
assertTrue(flashMessage.getText(), flashMessage.isSuccess());
navigation.users();
page.deleteUser(TEST_USER1.getUserName());
page.deleteUser(disabledUser.getUserName());
flashMessage.waitUntilPresent();
assertTrue(flashMessage.getText(), flashMessage.isSuccess());
assertNull(page.findUser(TEST_USER1.getUserName()));
assertNull(page.findUser(disabledUser.getUserName()));
}