More e2d tests (#258)

This commit is contained in:
Jonas Plum
2022-06-15 04:03:22 +02:00
committed by GitHub
parent 2ac1dd29ad
commit 2026cb3c6a
10 changed files with 181 additions and 53 deletions

View File

@@ -14,10 +14,15 @@ Cypress.on('uncaught:exception', (err, runnable) => {
})
Cypress.Commands.add('login', (options = {}) => {
// login
cy.contains("Name").click({force: true});
cy.get("#username").type("tom");
cy.contains("Password").click({force: true});
cy.get("#password").type("tom");
cy.get("button").contains("Login").click();
if (Cypress.env('AUTH') === 'simple') {
cy.contains("Name").click({force: true});
cy.get("#username").type("tom");
cy.contains("Password").click({force: true});
cy.get("#password").type("tom");
cy.get("button").contains("Login").click();
} else if (Cypress.env('AUTH') === 'keycloak') {
cy.get("#username").type("bob");
cy.get("#password").type("bob");
cy.get("#kc-login").click();
}
})