KEYCLOAK-3841 Unignore and fix fuse on eap test
This commit is contained in:
parent
fb6a8da863
commit
86c49f5e89
4 changed files with 32 additions and 4 deletions
|
@ -9,4 +9,6 @@ cd $JBOSS_HOME
|
|||
java -jar $FUSE_INSTALLER_NAME
|
||||
rm $FUSE_INSTALLER_NAME
|
||||
|
||||
mv standalone/deployments/hawtio*.war standalone/deployments/hawtio.war
|
||||
|
||||
exit 0
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<fuse.installer.groupId>com.redhat.fuse.eap</fuse.installer.groupId>
|
||||
<fuse.installer.artifactId>fuse-eap-installer</fuse.installer.artifactId>
|
||||
<fuse.installer.version>6.3.0.redhat-187</fuse.installer.version>
|
||||
<fuse.installer.version>6.3.0.redhat-224</fuse.installer.version>
|
||||
|
||||
<app.server.oidc.adapter.artifactId>keycloak-eap6-adapter-dist</app.server.oidc.adapter.artifactId>
|
||||
</properties>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
package org.keycloak.testsuite.adapter.page;
|
||||
|
||||
import org.keycloak.testsuite.page.AbstractPage;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.support.FindBy;
|
||||
|
||||
import javax.ws.rs.core.UriBuilder;
|
||||
import java.net.URL;
|
||||
|
||||
import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement;
|
||||
|
||||
/**
|
||||
* @author mhajas
|
||||
|
@ -21,4 +25,20 @@ public class HawtioPage extends AbstractPage {
|
|||
public UriBuilder createUriBuilder() {
|
||||
return UriBuilder.fromUri(getUrl());
|
||||
}
|
||||
|
||||
@FindBy(xpath = "//a[@class='dropdown-toggle' and @data-original-title='Preferences and log out']")
|
||||
private WebElement dropDownMenu;
|
||||
|
||||
@FindBy(xpath = "//a[@ng-click='logout()']")
|
||||
private WebElement logoutButton;
|
||||
|
||||
public void logout() {
|
||||
waitUntilElement(dropDownMenu).is().visible();
|
||||
dropDownMenu.click();
|
||||
waitUntilElement(logoutButton).is().visible();
|
||||
logoutButton.click();
|
||||
By modal = By.xpath("//input[@type='submit' and @value='Yes']");
|
||||
waitUntilElement(modal).is().visible();
|
||||
driver.findElement(modal).click();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.keycloak.testsuite.adapter.example;
|
||||
|
||||
import org.jboss.arquillian.graphene.page.Page;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.keycloak.representations.idm.RealmRepresentation;
|
||||
|
@ -27,14 +28,19 @@ public abstract class AbstractHawtioAdapterTest extends AbstractExampleAdapterTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@Ignore //Waiting for PATCH-1446
|
||||
public void hawtioTest() {
|
||||
public void hawtioLoginAndLogoutTest() {
|
||||
testRealmLoginPage.setAuthRealm(DEMO);
|
||||
|
||||
hawtioPage.navigateTo();
|
||||
assertCurrentUrlStartsWith(testRealmLoginPage);
|
||||
testRealmLoginPage.form().login("root", "password");
|
||||
|
||||
assertCurrentUrlStartsWith(hawtioPage.getDriver(), hawtioPage.toString() + "/welcome");
|
||||
|
||||
hawtioPage.logout();
|
||||
assertCurrentUrlStartsWith(testRealmLoginPage);
|
||||
|
||||
hawtioPage.navigateTo();
|
||||
assertCurrentUrlStartsWith(testRealmLoginPage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue