KEYCLOAK-3955

This commit is contained in:
mhajas 2017-03-28 16:05:44 +02:00
parent 45ea3c8b47
commit 3bb587530b

View file

@ -22,12 +22,16 @@ import org.jboss.arquillian.graphene.page.Page;
import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.VersionRepresentation;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest;
import org.keycloak.testsuite.adapter.page.AngularCorsProductTestApp; import org.keycloak.testsuite.adapter.page.AngularCorsProductTestApp;
import org.keycloak.testsuite.adapter.page.CorsDatabaseServiceTestApp; import org.keycloak.testsuite.adapter.page.CorsDatabaseServiceTestApp;
import org.keycloak.testsuite.auth.page.account.Account; import org.keycloak.testsuite.auth.page.account.Account;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
@ -112,9 +116,12 @@ public abstract class AbstractCorsExampleAdapterTest extends AbstractExampleAdap
angularCorsProductPage.loadPublicRealmInfo(); angularCorsProductPage.loadPublicRealmInfo();
waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Realm name: cors"); waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Realm name: cors");
angularCorsProductPage.loadVersion(); Client client = ClientBuilder.newClient();
waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Keycloak version: " + System.getProperty("project.version")); WebTarget target = client.target(authServerPage.createUriBuilder()).path("version");
VersionRepresentation version = target.request().get(VersionRepresentation.class);
angularCorsProductPage.loadVersion();
waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Keycloak version: " + version.getVersion());
} }
@AfterClass @AfterClass