keycloak-scim/tests/cypress/support/pages/WelcomePage.js
Aboullos daec4957f2
Add cypress framework (#271)
* Add cypress framework

* Add PR change requests

* Add initial .yml file for cypress tests

* Modify Run Keycloak line

* Modify Run Keycloak lines

* Modify Cypress test run

* Modify wait times

* Add more time

* Modify yarn start to npx http-server

* Try Cypress separate step

* Add test to set new admin console

* Modify uses to run

* Change yarn to npx http-server

* Add parameter to npx http-server

* Trigger GitHub actions

* Trigger GitHub actions

* Modify client_scope test messages

* Set headless mode

* Add steps to store artifacts

* Modify .yml

* Rebase onto realm fix and update real role message

* Update yaml file for artifact upload
2021-01-12 12:04:52 -05:00

27 lines
No EOL
702 B
JavaScript

export default class WelcomePage {
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;
}
}