added test for adding service account role (#954)
This commit is contained in:
parent
b0154b39a3
commit
fe740c0c21
2 changed files with 14 additions and 3 deletions
|
@ -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", () => {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue