0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-25 02:31:30 +01:00
posthog/cypress/support/index.js
Tim Glaser 7d7dca8f47
Remove signup process from cypress (#2264)
* Remove signup process from cypress

* adds cypress preflight tests

* run migrations before setting up test data

* fix preflight tests

* Update preflight.js

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2020-12-02 14:12:43 +01:00

27 lines
570 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('pass').should('have.value', 'pass')
cy.get('.btn').click()
}
Cypress.on('uncaught:exception', () => {
return false
})