keycloak-scim/cypress/support/pages/admin_console/CreateRealmPage.ts

29 lines
791 B
TypeScript
Raw Normal View History

2021-01-27 12:56:28 +00:00
export default class CreateRealmPage {
private browseBtn = "#kc-realm-filename-browse-button";
private clearBtn = ".pf-c-file-upload__file-select button:last-child";
private realmFileNameInput = "#kc-realm-filename";
private realmNameInput = "#kc-realm-name";
private enabledSwitch =
'[for="kc-realm-enabled-switch"] span.pf-c-switch__toggle';
private createBtn = '.pf-c-form__group:last-child button[type="submit"]';
private cancelBtn = '.pf-c-form__group:last-child button[type="button"]';
2021-01-27 12:56:28 +00:00
fillRealmName(realmName: string) {
cy.get(this.realmNameInput).clear().type(realmName);
2021-01-27 12:56:28 +00:00
return this;
}
createRealm() {
cy.get(this.createBtn).click();
return this;
}
cancelRealmCreation() {
cy.get(this.cancelBtn).click();
return this;
}
2021-01-27 12:56:28 +00:00
}