diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-fuse.bat b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-fuse.bat new file mode 100644 index 0000000000..16777d26f6 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-fuse.bat @@ -0,0 +1,11 @@ +set NOPAUSE=true + +cd %JBOSS_HOME% +start javaw -jar %FUSE_INSTALLER_NAME% +ping 127.0.0.1 -n 40 > nul +del %FUSE_INSTALLER_NAME% + +set JBOSS_HOME=%JBOSS_HOME:/=\% +ren %JBOSS_HOME%\standalone\deployments\hawtio*.war hawtio.war + +exit 0 \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractHawtioAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractHawtioAdapterTest.java index 962ccd8ddf..c05aac3f91 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractHawtioAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractHawtioAdapterTest.java @@ -7,12 +7,15 @@ import org.junit.Test; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; import org.keycloak.testsuite.adapter.page.HawtioPage; +import org.openqa.selenium.By; import java.util.List; import static org.keycloak.testsuite.auth.page.AuthRealm.DEMO; import static org.keycloak.testsuite.util.IOUtil.loadRealm; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWith; +import static org.keycloak.testsuite.util.WaitUtils.pause; +import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; /** * @author mhajas @@ -32,15 +35,21 @@ public abstract class AbstractHawtioAdapterTest extends AbstractExampleAdapterTe testRealmLoginPage.setAuthRealm(DEMO); hawtioPage.navigateTo(); + waitUntilElement(By.xpath("//body")).is().present(); + assertCurrentUrlStartsWith(testRealmLoginPage); testRealmLoginPage.form().login("root", "password"); + waitUntilElement(By.xpath("//body")).is().present(); assertCurrentUrlStartsWith(hawtioPage.getDriver(), hawtioPage.toString() + "/welcome"); hawtioPage.logout(); + pause(1000); + waitUntilElement(By.xpath("//body")).is().present(); assertCurrentUrlStartsWith(testRealmLoginPage); hawtioPage.navigateTo(); + waitUntilElement(By.xpath("//body")).is().present(); assertCurrentUrlStartsWith(testRealmLoginPage); } }