Merge pull request #3036 from stianst/master
Added umlats test to registration test
This commit is contained in:
commit
30d651bcee
1 changed files with 30 additions and 0 deletions
|
@ -23,6 +23,7 @@ import org.keycloak.representations.idm.RealmRepresentation;
|
|||
import org.keycloak.representations.idm.UserRepresentation;
|
||||
import org.keycloak.testsuite.AssertEvents;
|
||||
import org.keycloak.testsuite.TestRealmKeycloakTest;
|
||||
import org.keycloak.testsuite.pages.AccountUpdateProfilePage;
|
||||
import org.keycloak.testsuite.pages.AppPage;
|
||||
import org.keycloak.testsuite.pages.AppPage.RequestType;
|
||||
import org.keycloak.testsuite.pages.LoginPage;
|
||||
|
@ -51,6 +52,9 @@ public class RegisterTest extends TestRealmKeycloakTest {
|
|||
@Page
|
||||
protected RegisterPage registerPage;
|
||||
|
||||
@Page
|
||||
protected AccountUpdateProfilePage accountPage;
|
||||
|
||||
@Override
|
||||
public void configureTestRealm(RealmRepresentation testRealm) {
|
||||
}
|
||||
|
@ -256,6 +260,32 @@ public class RegisterTest extends TestRealmKeycloakTest {
|
|||
assertEquals("lastName", user.getLastName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void registerUserUmlats() {
|
||||
loginPage.open();
|
||||
|
||||
assertTrue(loginPage.isCurrent());
|
||||
|
||||
loginPage.clickRegister();
|
||||
registerPage.assertCurrent();
|
||||
|
||||
registerPage.register("Äǜṳǚǘǖ", "Öṏṏ", "registeruserumlats@email", "registeruserumlats", "password", "password");
|
||||
|
||||
String userId = events.expectRegister("registeruserumlats", "registeruserumlats@email").assertEvent().getUserId();
|
||||
events.expectLogin().detail("username", "registeruserumlats").user(userId).assertEvent();
|
||||
|
||||
accountPage.open();
|
||||
assertTrue(accountPage.isCurrent());
|
||||
|
||||
UserRepresentation user = getUser(userId);
|
||||
Assert.assertNotNull(user);
|
||||
assertEquals("Äǜṳǚǘǖ", user.getFirstName());
|
||||
assertEquals("Öṏṏ", user.getLastName());
|
||||
|
||||
assertEquals("Äǜṳǚǘǖ", accountPage.getFirstName());
|
||||
assertEquals("Öṏṏ", accountPage.getLastName());
|
||||
}
|
||||
|
||||
// KEYCLOAK-3266
|
||||
@Test
|
||||
public void registerUserNotUsernamePasswordPolicy() {
|
||||
|
|
Loading…
Reference in a new issue