KEYCLOAK-1857 Prefill update profile form with username from user or formdata
This commit is contained in:
parent
43541d3028
commit
9d8d690100
2 changed files with 3 additions and 1 deletions
|
@ -70,6 +70,8 @@ public class ProfileBean {
|
|||
|
||||
}
|
||||
|
||||
public String getUsername() { return formData != null ? formData.getFirst("username") : user.getUsername(); }
|
||||
|
||||
public String getFirstName() {
|
||||
return formData != null ? formData.getFirst("firstName") : user.getFirstName();
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ public class RequiredActionUpdateProfileTest {
|
|||
Assert.assertEquals("New first", updateProfilePage.getFirstName());
|
||||
Assert.assertEquals("New last", updateProfilePage.getLastName());
|
||||
Assert.assertEquals("new@email.com", updateProfilePage.getEmail());
|
||||
Assert.assertEquals("", updateProfilePage.getUsername());
|
||||
Assert.assertEquals("test-user@localhost", updateProfilePage.getUsername());
|
||||
|
||||
Assert.assertEquals("Username already exists.", updateProfilePage.getError());
|
||||
|
||||
|
|
Loading…
Reference in a new issue