From 07c3772b083538e8b1c259c2bd135768a6ea14b4 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 13 Oct 2015 07:36:20 +0200 Subject: [PATCH] KEYCLOAK-1823 Annoying behaviour of validations in user registration form --- .../org/keycloak/testsuite/forms/RegisterTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java index 1b7ce4391d..932630ba09 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java @@ -194,16 +194,20 @@ public class RegisterTest { } @Test - @Ignore - public void registerUserMissingUsernameAndInvalidEmail() { + public void registerUserManyErrors() { loginPage.open(); loginPage.clickRegister(); registerPage.assertCurrent(); - registerPage.register("firstName", "lastName", "registerUserInvalidEmail", null, "password", "password"); + registerPage.register(null, null, null, "registerUserManyErrors", null, "password"); 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") .removeDetail(Details.USERNAME)