KEYCLOAK-1823

Annoying behaviour of validations in user registration form
This commit is contained in:
Stian Thorgersen 2015-10-13 07:36:20 +02:00
parent 85a886da18
commit 07c3772b08

View file

@ -194,16 +194,20 @@ public class RegisterTest {
} }
@Test @Test
@Ignore public void registerUserManyErrors() {
public void registerUserMissingUsernameAndInvalidEmail() {
loginPage.open(); loginPage.open();
loginPage.clickRegister(); loginPage.clickRegister();
registerPage.assertCurrent(); registerPage.assertCurrent();
registerPage.register("firstName", "lastName", "registerUserInvalidEmail", null, "password", "password"); registerPage.register(null, null, null, "registerUserManyErrors", null, "password");
registerPage.assertCurrent(); registerPage.assertCurrent();
assertEquals("Please specify username.", registerPage.getError());
System.out.println(registerPage.getError());
assertEquals("Please specify first name.\n" +
"Please specify last name.\n" +
"Please specify email.", registerPage.getError());
events.expectRegister(null, "registerUserMissingUsername@email") events.expectRegister(null, "registerUserMissingUsername@email")
.removeDetail(Details.USERNAME) .removeDetail(Details.USERNAME)