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()
|
.goToServiceAccountTab()
|
||||||
.checkRoles(["manage-account", "offline_access", "uma_authorization"]);
|
.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", () => {
|
describe("Keys tab test", () => {
|
||||||
|
|
|
@ -2,7 +2,8 @@ const expect = chai.expect;
|
||||||
export default class RoleMappingTab {
|
export default class RoleMappingTab {
|
||||||
private tab = "#pf-tab-serviceAccount-serviceAccount";
|
private tab = "#pf-tab-serviceAccount-serviceAccount";
|
||||||
private scopeTab = "scopeTab";
|
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 unAssign = "unAssignRole";
|
||||||
private assign = "assign";
|
private assign = "assign";
|
||||||
private hide = "#hideInheritedRoles";
|
private hide = "#hideInheritedRoles";
|
||||||
|
@ -19,8 +20,8 @@ export default class RoleMappingTab {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
clickAssignRole() {
|
clickAssignRole(notEmpty = true) {
|
||||||
cy.getId(this.assignRole).click();
|
cy.getId(notEmpty ? this.assignEmptyRole : this.assignRole).click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue