mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-09 16:52:51 +01:00
Upgrade Cypress (#245)
This commit is contained in:
23
ui/cypress/support/e2e.js
Normal file
23
ui/cypress/support/e2e.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// ***********************************************************
|
||||
// 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();
|
||||
})
|
||||
Reference in New Issue
Block a user