2021-03-24 14:07:49 +00:00
|
|
|
export default class GroupModal {
|
2021-03-01 15:06:04 +00:00
|
|
|
private nameInput = "groupNameInput";
|
|
|
|
private createButton = "createGroup";
|
2021-03-24 14:07:49 +00:00
|
|
|
private renameButton = "renameGroup";
|
2021-03-01 15:06:04 +00:00
|
|
|
|
|
|
|
open(name?: string) {
|
2021-06-16 11:35:03 +00:00
|
|
|
if (name) {
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(name).click();
|
2021-06-16 11:35:03 +00:00
|
|
|
} else {
|
|
|
|
cy.get("button").contains("Create").click();
|
|
|
|
}
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
fillGroupForm(name = "") {
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(this.nameInput).clear().type(name);
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
clickCreate() {
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(this.createButton).click();
|
2021-05-20 15:38:10 +00:00
|
|
|
|
2021-03-01 15:06:04 +00:00
|
|
|
return this;
|
|
|
|
}
|
2021-03-24 14:07:49 +00:00
|
|
|
|
|
|
|
clickRename() {
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(this.renameButton).click();
|
2021-03-24 14:07:49 +00:00
|
|
|
return this;
|
|
|
|
}
|
2021-03-01 15:06:04 +00:00
|
|
|
}
|