mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
9b8736d576
* Speed up e2e builds * Don't go to demo when logging in/cypress errors * Execute cypress in docker container * Pull from correct image * add -T * Try something else * Add dockerfile * Don't push tags * Tag * Try another tag * image tag * Try pulling * Try * Try caching * no docker ifle * Install node * name * name
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import './commands'
|
|
|
|
beforeEach(() => {
|
|
cy.visit('/')
|
|
|
|
cy.url().then(url => {
|
|
if (url.includes('setup_admin')) {
|
|
cy.get('#inputCompany')
|
|
.type('company')
|
|
.should('have.value', 'company')
|
|
|
|
cy.get('#inputName')
|
|
.type('name')
|
|
.should('have.value', 'name')
|
|
|
|
cy.get('#inputEmail')
|
|
.type('fake@posthog.com')
|
|
.should('have.value', 'fake@posthog.com')
|
|
|
|
cy.get('#inputPassword')
|
|
.type('password')
|
|
.should('have.value', 'password')
|
|
|
|
cy.get('.btn').click()
|
|
|
|
cy.visit('/demo')
|
|
cy.visit('/')
|
|
} else if (url.includes('login')) {
|
|
cy.get('#inputEmail')
|
|
.type('fake@posthog.com')
|
|
.should('have.value', 'fake@posthog.com')
|
|
|
|
cy.get('#inputPassword')
|
|
.type('password')
|
|
.should('have.value', 'password')
|
|
|
|
cy.get('.btn').click()
|
|
}
|
|
})
|
|
})
|
|
|
|
Cypress.on('uncaught:exception', () => {
|
|
return false
|
|
})
|