keycloak-scim/tests/cypress/support/pages/WelcomePage.ts

33 lines
773 B
TypeScript
Raw Normal View History

2021-01-27 12:56:28 +00:00
export default class WelcomePage {
userNameInput: string;
passwordInput: string;
confirmPasswordInput: string;
createBtn: string;
adminConsoleBtn: string;
constructor() {
this.userNameInput = "#username";
this.passwordInput = "#password";
this.confirmPasswordInput = "#passwordConfirmation";
this.createBtn = "#create-button";
this.adminConsoleBtn = ".welcome-primary-link a";
}
createAdminUser(userName = "admin", password = "admin") {
cy.get(this.userNameInput).type(userName);
cy.get(this.passwordInput).type(password);
cy.get(this.confirmPasswordInput).type(password);
cy.get(this.createBtn).click();
return this;
}
goToAdminConsole() {
cy.get(this.adminConsoleBtn).click();
return this;
}
}