Fix grantServerBasedApp test
This commit is contained in:
parent
8c4f071003
commit
27f6390d00
2 changed files with 3 additions and 5 deletions
|
@ -45,6 +45,6 @@ public class OAuthGrant extends LoginActions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCurrent() {
|
public boolean isCurrent() {
|
||||||
return driver.getTitle().equals("OAuth Grant");
|
return driver.getPageSource().contains("Do you grant these access privileges");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@ import org.keycloak.testsuite.admin.ApiUtil;
|
||||||
import org.keycloak.testsuite.auth.page.account.Account;
|
import org.keycloak.testsuite.auth.page.account.Account;
|
||||||
import org.keycloak.testsuite.auth.page.account.Applications;
|
import org.keycloak.testsuite.auth.page.account.Applications;
|
||||||
import org.keycloak.testsuite.auth.page.login.OAuthGrant;
|
import org.keycloak.testsuite.auth.page.login.OAuthGrant;
|
||||||
import org.keycloak.testsuite.console.page.clients.settings.ClientSettings;
|
|
||||||
import org.keycloak.testsuite.console.page.clients.Clients;
|
import org.keycloak.testsuite.console.page.clients.Clients;
|
||||||
|
import org.keycloak.testsuite.console.page.clients.settings.ClientSettings;
|
||||||
import org.keycloak.testsuite.console.page.events.Config;
|
import org.keycloak.testsuite.console.page.events.Config;
|
||||||
import org.keycloak.testsuite.console.page.events.LoginEvents;
|
import org.keycloak.testsuite.console.page.events.LoginEvents;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
|
@ -203,9 +203,6 @@ public abstract class AbstractDemoExampleAdapterTest extends AbstractExampleAdap
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void grantServerBasedApp() {
|
public void grantServerBasedApp() {
|
||||||
clientsPage.navigateTo();
|
|
||||||
loginPage.form().login(adminUser);
|
|
||||||
|
|
||||||
ClientResource clientResource = ApiUtil.findClientResourceByClientId(testRealmResource(), "customer-portal");
|
ClientResource clientResource = ApiUtil.findClientResourceByClientId(testRealmResource(), "customer-portal");
|
||||||
ClientRepresentation client = clientResource.toRepresentation();
|
ClientRepresentation client = clientResource.toRepresentation();
|
||||||
client.setConsentRequired(true);
|
client.setConsentRequired(true);
|
||||||
|
@ -237,6 +234,7 @@ public abstract class AbstractDemoExampleAdapterTest extends AbstractExampleAdap
|
||||||
assertTrue(oAuthGrantPage.isCurrent());
|
assertTrue(oAuthGrantPage.isCurrent());
|
||||||
|
|
||||||
loginEventsPage.navigateTo();
|
loginEventsPage.navigateTo();
|
||||||
|
loginPage.form().login(adminUser);
|
||||||
loginEventsPage.table().filter();
|
loginEventsPage.table().filter();
|
||||||
loginEventsPage.table().filterForm().addEventType("REVOKE_GRANT");
|
loginEventsPage.table().filterForm().addEventType("REVOKE_GRANT");
|
||||||
loginEventsPage.table().update();
|
loginEventsPage.table().update();
|
||||||
|
|
Loading…
Reference in a new issue