keycloak-scim/cypress/support/pages/admin_console/manage/AttributesTab.ts

37 lines
874 B
TypeScript
Raw Normal View History

2021-10-25 14:38:54 +00:00
export default class AttributesTab {
private saveAttributeBtn = "save-attributes";
private addAttributeBtn = "attribute-add-row";
2021-10-25 14:38:54 +00:00
private attributesTab = "attributes";
private attributeRow = "attribute-row";
private keyInput = "attribute-key-input";
private valueInput = "attribute-value-input";
2021-10-25 14:38:54 +00:00
goToAttributesTab() {
cy.findByTestId(this.attributesTab).click();
return this;
}
addRow() {
cy.findByTestId(this.addAttributeBtn).click();
return this;
}
fillLastRow(key: string, value: string) {
cy.findAllByTestId(this.attributeRow)
.last()
.findByTestId(this.keyInput)
.type(key);
cy.findAllByTestId(this.attributeRow)
.last()
.findByTestId(this.valueInput)
.type(value);
2021-10-25 14:38:54 +00:00
return this;
}
saveAttribute() {
cy.findByTestId(this.saveAttributeBtn).click();
return this;
}
}