keycloak-scim/cypress/support/pages/admin_console/manage/groups/GroupModal.ts
2022-06-27 10:47:41 +02:00

30 lines
785 B
TypeScript

import ModalUtils from "../../../../util/ModalUtils";
export default class GroupModal extends ModalUtils {
private createGroupModalTitle = "Create a group";
private groupNameInput = "groupNameInput";
private createGroupBnt = "createGroup";
private renameButton = "renameGroup";
public setGroupNameInput(name: string) {
cy.findByTestId(this.groupNameInput).clear().type(name);
return this;
}
public create() {
cy.findByTestId(this.createGroupBnt).click();
return this;
}
public rename() {
cy.findByTestId(this.renameButton).click();
return this;
}
public assertCreateGroupModalVisible(isVisible: boolean) {
super
.assertModalVisible(isVisible)
.assertModalTitleEqual(this.createGroupModalTitle);
return this;
}
}