0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/cypress/integration/preflight.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

25 lines
1.1 KiB
JavaScript

describe('Preflight', () => {
beforeEach(() => {
cy.visit('/logout')
cy.visit('/preflight')
})
it('Preflight experimentation', () => {
cy.get('[data-attr=preflight-experimentation]').click()
cy.get('[data-attr=preflight-refresh]').should('be.visible')
cy.get('[data-attr=caption]').should('contain', 'Not required for development or testing')
cy.wait(200)
cy.get('[data-attr=preflightStatus]').should('contain', 'All systems go!')
cy.get('[data-attr=preflight-complete]').click()
cy.url().should('include', '/login') // use /login instead of /signup because as there's a user already in the app, the /signup route will be redirected
})
it('Preflight live mode', () => {
cy.get('[data-attr=preflight-live]').click()
cy.get('[data-attr=preflight-refresh]').should('be.visible')
cy.get('[data-attr=caption]').should('contain', 'Install before ingesting real user data')
cy.wait(200)
cy.get('[data-attr=preflightStatus]').should('contain', 'All systems go!')
})
})