KEYCLOAK-7616 fix NPE for UserStorageConsentTest
This commit is contained in:
parent
fb883254f6
commit
ccb09fbf45
1 changed files with 2 additions and 1 deletions
|
@ -117,6 +117,7 @@ public class UserStorageConsentTest extends AbstractServletsAdapterTest {
|
||||||
ClientModel product = session.realms().getClientByClientId("product-portal", realm);
|
ClientModel product = session.realms().getClientByClientId("product-portal", realm);
|
||||||
product.setConsentRequired(true);
|
product.setConsentRequired(true);
|
||||||
ClientScopeModel clientScope = realm.addClientScope("clientScope");
|
ClientScopeModel clientScope = realm.addClientScope("clientScope");
|
||||||
|
clientScope.setProtocol(OIDCLoginProtocol.LOGIN_PROTOCOL);
|
||||||
System.err.println("client scope protocol mappers size: " + clientScope.getProtocolMappers().size());
|
System.err.println("client scope protocol mappers size: " + clientScope.getProtocolMappers().size());
|
||||||
|
|
||||||
for (ProtocolMapperModel mapper : product.getProtocolMappers()) {
|
for (ProtocolMapperModel mapper : product.getProtocolMappers()) {
|
||||||
|
@ -163,7 +164,7 @@ public class UserStorageConsentTest extends AbstractServletsAdapterTest {
|
||||||
productPortal.navigateTo();
|
productPortal.navigateTo();
|
||||||
assertCurrentUrlStartsWithLoginUrlOf(testRealmPage);
|
assertCurrentUrlStartsWithLoginUrlOf(testRealmPage);
|
||||||
testRealmLoginPage.form().login("memuser", "password");
|
testRealmLoginPage.form().login("memuser", "password");
|
||||||
org.keycloak.testsuite.Assert.assertTrue(consentPage.isCurrent());
|
Assert.assertTrue(consentPage.isCurrent());
|
||||||
consentPage.confirm();
|
consentPage.confirm();
|
||||||
assertCurrentUrlEquals(productPortal.toString());
|
assertCurrentUrlEquals(productPortal.toString());
|
||||||
Assert.assertTrue(driver.getPageSource().contains("iPhone"));
|
Assert.assertTrue(driver.getPageSource().contains("iPhone"));
|
||||||
|
|
Loading…
Reference in a new issue