2021-01-27 12:56:28 +00:00
|
|
|
export default class CreateRealmPage {
|
2022-02-16 16:34:54 +00:00
|
|
|
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
|
|
|
|
2021-01-28 09:07:12 +00:00
|
|
|
fillRealmName(realmName: string) {
|
2022-01-20 10:20:35 +00:00
|
|
|
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;
|
|
|
|
}
|
2022-02-16 16:34:54 +00:00
|
|
|
|
|
|
|
cancelRealmCreation() {
|
|
|
|
cy.get(this.cancelBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
2021-01-27 12:56:28 +00:00
|
|
|
}
|