0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:49:32 +01:00
posthog/cypress/support/index.js
Paolo D'Amico 167a79fa2f
Release navigation-1775 (#3167)
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2021-02-04 10:53:00 +01:00

27 lines
578 B
JavaScript

import './commands'
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('cypress-terminal-report/src/installLogsCollector')()
beforeEach(() => {
cy.visit('/')
cy.url().then((url) => {
if (url.includes('login')) {
logIn()
}
})
})
const logIn = () => {
cy.get('#inputEmail').type('test@posthog.com').should('have.value', 'test@posthog.com')
cy.get('#inputPassword').type('12345678').should('have.value', '12345678')
cy.get('.btn').click()
}
Cypress.on('uncaught:exception', () => {
return false
})