mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 07:12:46 +01:00
24 lines
623 B
JavaScript
24 lines
623 B
JavaScript
// ***********************************************************
|
|
// global configuration
|
|
// https://on.cypress.io/configuration
|
|
// ***********************************************************
|
|
|
|
import './commands'
|
|
|
|
Cypress.Cookies.defaults({
|
|
preserve: 'user',
|
|
})
|
|
|
|
Cypress.on('uncaught:exception', (err, runnable) => {
|
|
return false
|
|
})
|
|
|
|
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();
|
|
})
|