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

34 lines
881 B
TypeScript
Raw Normal View History

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