added test for adding service account role (#954)

This commit is contained in:
Erik Jan de Wit 2021-08-10 14:41:56 +02:00 committed by GitHub
parent b0154b39a3
commit fe740c0c21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -188,6 +188,16 @@ describe("Clients test", function () {
.goToServiceAccountTab()
.checkRoles(["manage-account", "offline_access", "uma_authorization"]);
});
it("assign", () => {
listingPage.goToItemDetails(serviceAccountName);
serviceAccountTab
.goToServiceAccountTab()
.clickAssignRole(false)
.selectRow("create-realm")
.clickAssign();
masthead.checkNotificationMessage("Role mapping updated");
});
});
describe("Keys tab test", () => {

View file

@ -2,7 +2,8 @@ const expect = chai.expect;
export default class RoleMappingTab {
private tab = "#pf-tab-serviceAccount-serviceAccount";
private scopeTab = "scopeTab";
private assignRole = "no-roles-for-this-client-empty-action";
private assignEmptyRole = "no-roles-for-this-client-empty-action";
private assignRole = "assignRole";
private unAssign = "unAssignRole";
private assign = "assign";
private hide = "#hideInheritedRoles";
@ -19,8 +20,8 @@ export default class RoleMappingTab {
return this;
}
clickAssignRole() {
cy.getId(this.assignRole).click();
clickAssignRole(notEmpty = true) {
cy.getId(notEmpty ? this.assignEmptyRole : this.assignRole).click();
return this;
}