84bf7925a6
* service account dialog * create test * fixed types * fixed realm roles selection * disable when no rows are selected Co-authored-by: Eugenia <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Eugenia <32821331+jenny-s51@users.noreply.github.com>
23 lines
628 B
TypeScript
23 lines
628 B
TypeScript
const expect = chai.expect;
|
|
export default class ServiceAccountTab {
|
|
private tab = "#pf-tab-serviceAccount-serviceAccount";
|
|
private assignedRolesTable = "assigned-roles";
|
|
private namesColumn = 'td[data-label="Name"]:visible';
|
|
|
|
goToTab() {
|
|
cy.get(this.tab).click();
|
|
return this;
|
|
}
|
|
|
|
checkRoles(roleNames: string[]) {
|
|
cy.getId(this.assignedRolesTable)
|
|
.get(this.namesColumn)
|
|
.should((roles) => {
|
|
for (let index = 0; index < roleNames.length; index++) {
|
|
const roleName = roleNames[index];
|
|
expect(roles).to.contain(roleName);
|
|
}
|
|
});
|
|
return this;
|
|
}
|
|
}
|