Added test for updating user profile

This commit is contained in:
Stian Thorgersen 2013-08-22 12:09:10 +01:00
parent 2bc2126317
commit b9c6d89325

View file

@ -37,7 +37,7 @@ public class AccountTest extends AbstractDroneTest {
registerUser("changePassword", "password");
selenium.open(authServerUrl + "/rest/realms/demo/account/password");
selenium.waitForPageToLoad("10000");
selenium.waitForPageToLoad(DEFAULT_WAIT);
Assert.assertTrue(selenium.isTextPresent("Change Password"));
@ -45,7 +45,7 @@ public class AccountTest extends AbstractDroneTest {
selenium.type("id=password-new", "newpassword");
selenium.type("id=password-confirm", "newpassword");
selenium.click("css=input[type=\"submit\"]");
selenium.waitForPageToLoad("30000");
selenium.waitForPageToLoad(DEFAULT_WAIT);
logout();
@ -53,4 +53,23 @@ public class AccountTest extends AbstractDroneTest {
login("changePassword", "newpassword");
}
@Test
public void changeProfile() {
registerUser("changeProfile", "password");
selenium.open(authServerUrl + "/rest/realms/demo/account");
selenium.waitForPageToLoad(DEFAULT_WAIT);
selenium.type("id=firstName", "Newfirst");
selenium.type("id=lastName", "Newlast");
selenium.type("id=email", "new@email.com");
selenium.click("css=input[type=\"submit\"]");
selenium.waitForPageToLoad(DEFAULT_WAIT);
Assert.assertEquals("Newfirst", selenium.getValue("id=firstName"));
Assert.assertEquals("Newlast", selenium.getValue("id=lastName"));
Assert.assertEquals("new@email.com", selenium.getValue("id=email"));
}
}