From 3bb587530b900f8babc1a24ad5ba0e9391667994 Mon Sep 17 00:00:00 2001 From: mhajas Date: Tue, 28 Mar 2017 16:05:44 +0200 Subject: [PATCH] KEYCLOAK-3955 --- .../example/cors/AbstractCorsExampleAdapterTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/AbstractCorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/AbstractCorsExampleAdapterTest.java index 534e0b1fe9..43981645aa 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/AbstractCorsExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/cors/AbstractCorsExampleAdapterTest.java @@ -22,12 +22,16 @@ import org.jboss.arquillian.graphene.page.Page; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.AfterClass; import org.junit.Test; +import org.keycloak.representations.VersionRepresentation; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; import org.keycloak.testsuite.adapter.page.AngularCorsProductTestApp; import org.keycloak.testsuite.adapter.page.CorsDatabaseServiceTestApp; 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.IOException; import java.util.List; @@ -112,9 +116,12 @@ public abstract class AbstractCorsExampleAdapterTest extends AbstractExampleAdap angularCorsProductPage.loadPublicRealmInfo(); waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Realm name: cors"); - angularCorsProductPage.loadVersion(); - waitUntilElement(angularCorsProductPage.getOutput()).text().contains("Keycloak version: " + System.getProperty("project.version")); + Client client = ClientBuilder.newClient(); + 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