mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-07 07:42:45 +01:00
More e2d tests (#258)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user