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

23 lines
561 B
TypeScript
Raw Normal View History

2021-10-25 14:38:54 +00:00
export default class AttributesTab {
private keyInput = '[name="attributes[0].key"]';
private valueInput = '[name="attributes[0].value"]';
private saveAttributeBtn = "save-attributes";
private attributesTab = "attributes";
goToAttributesTab() {
cy.findByTestId(this.attributesTab).click();
return this;
}
fillAttribute(key: string, value: string) {
cy.get(this.keyInput).type(key).get(this.valueInput).type(value);
return this;
}
saveAttribute() {
cy.findByTestId(this.saveAttributeBtn).click();
return this;
}
}