KEYCLOAK-17620 - Fix ClientClientScopesTest

This commit is contained in:
Alfredo Boullosa 2021-03-30 13:23:16 +02:00 committed by Pavel Drozd
parent 2f0f99c204
commit cd342ad571

View file

@ -20,7 +20,6 @@ package org.keycloak.testsuite.console.clients;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List;
import java.util.Set; import java.util.Set;
import org.jboss.arquillian.graphene.page.Page; import org.jboss.arquillian.graphene.page.Page;
@ -35,6 +34,8 @@ import org.keycloak.testsuite.console.page.clients.clientscopes.ClientScopesSetu
import org.keycloak.testsuite.console.page.clients.clientscopes.ClientScopesSetupForm; import org.keycloak.testsuite.console.page.clients.clientscopes.ClientScopesSetupForm;
import org.keycloak.util.JsonSerialization; import org.keycloak.util.JsonSerialization;
import org.keycloak.util.TokenUtil; import org.keycloak.util.TokenUtil;
import org.hamcrest.MatcherAssert;
import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.keycloak.testsuite.auth.page.login.Login.OIDC; import static org.keycloak.testsuite.auth.page.login.Login.OIDC;
@ -155,7 +156,8 @@ public class ClientClientScopesTest extends AbstractClientTest {
// Test roles // Test roles
evaluateForm.showRoles(); evaluateForm.showRoles();
Assert.assertNames(evaluateForm.getGrantedRealmRoles(), "offline_access"); Assert.assertNames(evaluateForm.getGrantedRealmRoles(), "offline_access");
Assert.assertNames(evaluateForm.getNotGrantedRealmRoles(), "uma_authorization"); MatcherAssert.assertThat(evaluateForm.getNotGrantedRealmRoles(),
hasItems("uma_authorization", "default-roles-test"));
// Test access token // Test access token
evaluateForm.showToken(); evaluateForm.showToken();