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

31 lines
785 B
TypeScript
Raw Normal View History

2022-06-27 08:47:41 +00:00
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";
2022-06-27 08:47:41 +00:00
public setGroupNameInput(name: string) {
cy.findByTestId(this.groupNameInput).clear().type(name);
return this;
}
2022-06-27 08:47:41 +00:00
public create() {
cy.findByTestId(this.createGroupBnt).click();
return this;
}
2022-06-27 08:47:41 +00:00
public rename() {
cy.findByTestId(this.renameButton).click();
return this;
}
2022-06-27 08:47:41 +00:00
public assertCreateGroupModalVisible(isVisible: boolean) {
super
.assertModalVisible(isVisible)
.assertModalTitleEqual(this.createGroupModalTitle);
return this;
}
}