mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
16 lines
No EOL
400 B
JavaScript
16 lines
No EOL
400 B
JavaScript
|
|
import '@testing-library/cypress/add-commands';
|
|
|
|
Cypress.Commands.add('login', (email, password) => {
|
|
cy.session([email, password], () => {
|
|
cy.visit('/email-login')
|
|
|
|
cy.get('input[name=email]').type(email)
|
|
cy.get('input[name=password]').type(password)
|
|
|
|
cy.get('form').submit()
|
|
|
|
cy.getCookie('auth').should('exist')
|
|
cy.location('pathname').should('include', '/home')
|
|
})
|
|
}) |