KEYCLOAK-1808
Revoke Grant button should disappear
This commit is contained in:
parent
5a3938d12f
commit
931102ff26
2 changed files with 7 additions and 1 deletions
|
@ -76,7 +76,7 @@
|
|||
</td>
|
||||
|
||||
<td>
|
||||
<#if application.client.consentRequired>
|
||||
<#if application.client.consentRequired && application.claimsGranted?has_content>
|
||||
<button type='submit' class='${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!}' id='revoke-${application.client.clientId}' name='clientId' value="${application.client.id}">${msg("revoke")}</button>
|
||||
</#if>
|
||||
</td>
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.keycloak.testsuite.pages.OAuthGrantPage;
|
|||
import org.keycloak.testsuite.rule.KeycloakRule;
|
||||
import org.keycloak.testsuite.rule.WebResource;
|
||||
import org.keycloak.testsuite.rule.WebRule;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -130,10 +131,15 @@ public class OAuthGrantTest {
|
|||
events.expectCodeToToken(codeId, loginEvent.getSessionId()).client("third-party").assertEvent();
|
||||
|
||||
accountAppsPage.open();
|
||||
|
||||
assertEquals(1, driver.findElements(By.id("revoke-third-party")).size());
|
||||
|
||||
accountAppsPage.revokeGrant("third-party");
|
||||
|
||||
events.expect(EventType.REVOKE_GRANT)
|
||||
.client("account").detail(Details.REVOKED_CLIENT, "third-party").assertEvent();
|
||||
|
||||
assertEquals(0, driver.findElements(By.id("revoke-third-party")).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue