2020-05-19 20:48:10 +02:00
|
|
|
import './commands'
|
|
|
|
|
2020-08-11 10:52:43 +02:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
|
|
require('cypress-terminal-report/src/installLogsCollector')()
|
|
|
|
|
2020-05-19 20:48:10 +02:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.visit('/')
|
|
|
|
|
2020-07-03 14:37:07 +02:00
|
|
|
cy.url().then((url) => {
|
2020-12-02 14:12:43 +01:00
|
|
|
if (url.includes('login')) {
|
2020-09-07 16:23:13 +02:00
|
|
|
logIn()
|
2020-05-19 20:48:10 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
2020-09-07 16:23:13 +02:00
|
|
|
const logIn = () => {
|
2020-12-02 14:12:43 +01:00
|
|
|
cy.get('#inputEmail').type('test@posthog.com').should('have.value', 'test@posthog.com')
|
2020-09-07 16:23:13 +02:00
|
|
|
|
2021-02-04 10:53:00 +01:00
|
|
|
cy.get('#inputPassword').type('12345678').should('have.value', '12345678')
|
2020-09-07 16:23:13 +02:00
|
|
|
|
|
|
|
cy.get('.btn').click()
|
|
|
|
}
|
|
|
|
|
2020-06-08 20:34:39 +02:00
|
|
|
Cypress.on('uncaught:exception', () => {
|
2020-05-19 20:48:10 +02:00
|
|
|
return false
|
|
|
|
})
|