From b5660cbbab79b6468ec9e5934cacfd6af537333f Mon Sep 17 00:00:00 2001 From: Vaclav Muzikar Date: Mon, 8 Feb 2016 15:32:32 +0100 Subject: [PATCH] Fix LoginActions.feedbackText selector (cherry picked from commit d05f809) --- .../org/keycloak/testsuite/auth/page/login/LoginActions.java | 4 ++-- .../java/org/keycloak/testsuite/account/RegistrationTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java index 4b3d2b0f1a..484072c3e7 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/auth/page/login/LoginActions.java @@ -40,11 +40,11 @@ public class LoginActions extends AuthRealm { @FindBy(css = "div[id='kc-form-options'] span a") private WebElement backToLoginForm; - @FindBy(xpath = "//span[@class='kc-feedback-text' and text()]") + @FindBy(xpath = "//span[@class='kc-feedback-text' and string-length(text())>1]") private WebElement feedbackText; public String getFeedbackText() { - waitUntilElement(feedbackText, "Feedback message should be present").is().present(); + waitUntilElement(feedbackText, "Feedback message should be present").is().visible(); return feedbackText.getText(); } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java index c731ca17b4..a49d823202 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/account/RegistrationTest.java @@ -72,7 +72,7 @@ public class RegistrationTest extends AbstractAccountManagementTest { public void assertMessageAttributeMissing(String attributeName) { String feedbackTest = testRealmRegistrationPage.getFeedbackText(); String contains = "Please specify " + attributeName + "."; - assertTrue("'" + contains + "' doesn't contain '" + feedbackTest + "'", feedbackTest.contains(contains)); + assertTrue("'" + feedbackTest + "' doesn't contain '" + contains + "'", feedbackTest.contains(contains)); } @Test