KEYCLOAK-17619 - Fix DefaultRolesTest
This commit is contained in:
parent
d9ebbe4958
commit
2f0f99c204
2 changed files with 8 additions and 1 deletions
|
@ -32,6 +32,8 @@ public class RoleCompositeRoles extends Form {
|
|||
protected Select availableRealmRolesSelect;
|
||||
@FindBy(id = "assigned")
|
||||
protected Select assignedRealmRolesSelect;
|
||||
@FindBy(id = "realm-composite")
|
||||
protected Select effectiveRealmRolesSelect;
|
||||
|
||||
@FindBy(id = "clients")
|
||||
protected Select clientSelect;
|
||||
|
@ -160,6 +162,11 @@ public class RoleCompositeRoles extends Form {
|
|||
return UIUtils.selectContainsOption(assignedRealmRolesSelect, role);
|
||||
}
|
||||
|
||||
public boolean isEffectiveRole(String role) {
|
||||
waitUntilElement(By.id("realm-composite")).is().present();
|
||||
return UIUtils.selectContainsOption(effectiveRealmRolesSelect, role);
|
||||
}
|
||||
|
||||
public boolean isAssignedClientRole(String role) {
|
||||
waitUntilElement(By.id("assigned")).is().present();
|
||||
return UIUtils.selectContainsOption(assignedClientRolesSelect, role);
|
||||
|
|
|
@ -57,7 +57,7 @@ public class DefaultRolesTest extends AbstractRolesTest {
|
|||
users.table().clickUser(newUser.getUsername());
|
||||
|
||||
userPage.tabs().roleMappings();
|
||||
assertTrue(userRolesPage.form().isAssignedRole(defaultRoleName));
|
||||
assertTrue(userRolesPage.form().isEffectiveRole(defaultRoleName));
|
||||
}
|
||||
|
||||
public RolesResource rolesResource() {
|
||||
|
|
Loading…
Reference in a new issue