keycloak-uncached

[KEYCLOAK-6808] fix for the WildflyConsoleProtectionTest Access

4/4/2018 7:32:35 PM

Details

diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/AppServerWelcomePage.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/AppServerWelcomePage.java
index de8bc09..3da0273 100644
--- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/AppServerWelcomePage.java
+++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/pages/AppServerWelcomePage.java
@@ -34,7 +34,7 @@ public class AppServerWelcomePage extends AppServerContextRoot {
     @Page
     protected OIDCLogin loginPage;
 
-    @FindBy(xpath = "//a[text() = 'Access Control']")
+    @FindBy(xpath = "//span[text() = 'Access Control']")
     private WebElement accessControlLink;
 
     @FindBy(xpath = "//a[text() = 'Manage user profile']")
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/hal/WildflyConsoleProtectionTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/hal/WildflyConsoleProtectionTest.java
index 37e3bd3..4159430 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/hal/WildflyConsoleProtectionTest.java
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/hal/WildflyConsoleProtectionTest.java
@@ -93,8 +93,7 @@ public class WildflyConsoleProtectionTest extends AbstractAdapterTest {
         }
     }
 
-    @Test
-    public void testLogin() throws InterruptedException {
+    private void testLogin() throws InterruptedException {
         appServerWelcomePage.navigateToConsole();
         appServerWelcomePage.login("admin", "admin");
         WaitUtils.pause(2000);
@@ -103,9 +102,7 @@ public class WildflyConsoleProtectionTest extends AbstractAdapterTest {
 
     @Test
     public void testUserCanAccessAccountService() throws InterruptedException {
-        appServerWelcomePage.navigateToConsole();
-        appServerWelcomePage.login("admin", "admin");
-        WaitUtils.pause(2000);
+        testLogin();
         appServerWelcomePage.navigateToAccessControl();
         appServerWelcomePage.navigateManageProfile();
         assertTrue(accountUpdateProfilePage.isCurrent());