0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
posthog/cypress/integration/setup.js
Tim Glaser ce4da7a1f3
Improve app urls (#863)
* Improve app urls

* Remove saved message

* Add cypress tests

* Only show toast when saving URL

* Fix tests
2020-05-27 11:50:46 +01:00

24 lines
743 B
JavaScript

describe('Setup', () => {
it('Setup loaded', () => {
cy.get('[data-attr=menu-item-setup]').click()
cy.get('[data-attr=layout-content]').should('exist')
})
it('See suggestion and save', () => {
cy.getCookie('csrftoken')
.then((csrftoken) => {
cy.request({
url: '/api/user/',
body: {team: {app_urls: []}},
method: 'PATCH',
headers: {
'X-CSRFToken': csrftoken.value,
}})
})
cy.reload(true)
cy.get('[data-attr=menu-item-setup]').click()
cy.get('[data-attr=app-url-suggestion]').click()
cy.get('[data-attr=app-url-item]').should('contain', '/demo')
})
})