fix tests (#1793)
This commit is contained in:
parent
6b2f8a0161
commit
a88b38dec1
1 changed files with 13 additions and 22 deletions
|
@ -45,7 +45,7 @@ export default class ProviderPage {
|
||||||
private ldapAttNameInput = "ldap.attribute.name";
|
private ldapAttNameInput = "ldap.attribute.name";
|
||||||
private ldapAttValueInput = "ldap.attribute.value";
|
private ldapAttValueInput = "ldap.attribute.value";
|
||||||
private groupInput = "group";
|
private groupInput = "group";
|
||||||
private ldapDnInput = "groups.dn";
|
private ldapDnInput = "roles.dn";
|
||||||
|
|
||||||
// mapper types
|
// mapper types
|
||||||
private msadUserAcctMapper = "msad-user-account-control-mapper";
|
private msadUserAcctMapper = "msad-user-account-control-mapper";
|
||||||
|
@ -60,24 +60,14 @@ export default class ProviderPage {
|
||||||
private roleLdapMapper = "role-ldap-mapper";
|
private roleLdapMapper = "role-ldap-mapper";
|
||||||
private hcLdapRoleMapper = "hardcoded-ldap-role-mapper";
|
private hcLdapRoleMapper = "hardcoded-ldap-role-mapper";
|
||||||
|
|
||||||
private tab = "#pf-tab-serviceAccount-serviceAccount";
|
|
||||||
private scopeTab = "scopeTab";
|
|
||||||
private assignRole = "assignRole";
|
|
||||||
private unAssign = "unAssignRole";
|
|
||||||
private assign = "assign";
|
|
||||||
private hide = "#hideInheritedRoles";
|
|
||||||
private assignedRolesTable = "assigned-roles";
|
|
||||||
private namesColumn = 'td[data-label="Name"]:visible';
|
|
||||||
|
|
||||||
private rolesTab = "#pf-tab-roles-roles";
|
private rolesTab = "#pf-tab-roles-roles";
|
||||||
private createRoleBtn = "data-testid=no-roles-for-this-client-empty-action";
|
private createRoleBtn = "data-testid=no-roles-for-this-client-empty-action";
|
||||||
private realmRolesSaveBtn = "data-testid=realm-roles-save-button";
|
private realmRolesSaveBtn = "data-testid=realm-roles-save-button";
|
||||||
private roleNameField = "#kc-name";
|
private roleNameField = "#kc-name";
|
||||||
private clientIdSelect = "#kc-client-id";
|
private clientIdSelect = "#client\\.id-select-typeahead";
|
||||||
|
|
||||||
private groupName = "aa-uf-mappers-group";
|
private groupName = "aa-uf-mappers-group";
|
||||||
private clientName = "aa-uf-mappers-client";
|
private clientName = "aa-uf-mappers-client";
|
||||||
private roleName = "aa-uf-mappers-role";
|
|
||||||
|
|
||||||
changeCacheTime(unit: string, time: string) {
|
changeCacheTime(unit: string, time: string) {
|
||||||
switch (unit) {
|
switch (unit) {
|
||||||
|
@ -275,16 +265,17 @@ export default class ProviderPage {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case this.hcLdapRoleMapper:
|
case this.hcLdapRoleMapper:
|
||||||
cy.get(`[data-testid="selectRole"]`).click();
|
cy.get("#group-role-select-typeahead")
|
||||||
cy.wait(2000);
|
.click()
|
||||||
cy.get(this.namesColumn)
|
.get(".pf-c-select__menu-item")
|
||||||
.contains(this.clientName)
|
.first()
|
||||||
.parent()
|
.click();
|
||||||
.parent()
|
cy.get("#role-role-select-typeahead")
|
||||||
.within(() => {
|
.click()
|
||||||
cy.get('input[name="radioGroup"]').click();
|
.get(".pf-c-select__menu-item")
|
||||||
});
|
.first()
|
||||||
cy.findByTestId(this.assign).click();
|
.click();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Invalid mapper type.");
|
console.log("Invalid mapper type.");
|
||||||
|
|
Loading…
Reference in a new issue