0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/cypress/support/index.js

27 lines
578 B
JavaScript
Raw Normal View History

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
})