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";
|
2021-03-24 14:07:49 +00:00
|
|
|
private renameButton = "renameGroup";
|
2021-03-01 15:06:04 +00:00
|
|
|
|
2022-06-27 08:47:41 +00:00
|
|
|
public setGroupNameInput(name: string) {
|
|
|
|
cy.findByTestId(this.groupNameInput).clear().type(name);
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2022-06-27 08:47:41 +00:00
|
|
|
public create() {
|
|
|
|
cy.findByTestId(this.createGroupBnt).click();
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2022-06-27 08:47:41 +00:00
|
|
|
public rename() {
|
|
|
|
cy.findByTestId(this.renameButton).click();
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
2021-03-24 14:07:49 +00:00
|
|
|
|
2022-06-27 08:47:41 +00:00
|
|
|
public assertCreateGroupModalVisible(isVisible: boolean) {
|
|
|
|
super
|
|
|
|
.assertModalVisible(isVisible)
|
|
|
|
.assertModalTitleEqual(this.createGroupModalTitle);
|
2021-03-24 14:07:49 +00:00
|
|
|
return this;
|
|
|
|
}
|
2021-03-01 15:06:04 +00:00
|
|
|
}
|