keycloak-scim/cypress/support/pages/admin_console/manage/groups/GroupModal.ts

31 lines
609 B
TypeScript
Raw Normal View History

export default class GroupModal {
private nameInput = "groupNameInput";
private createButton = "createGroup";
private renameButton = "renameGroup";
open(name?: string) {
if (name) {
cy.findByTestId(name).click();
} else {
cy.get("button").contains("Create").click();
}
return this;
}
fillGroupForm(name = "") {
cy.findByTestId(this.nameInput).clear().type(name);
return this;
}
clickCreate() {
cy.findByTestId(this.createButton).click();
2021-05-20 15:38:10 +00:00
return this;
}
clickRename() {
cy.findByTestId(this.renameButton).click();
return this;
}
}