0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-30 19:41:46 +01:00
posthog/cypress/integration/projectSettings.js
Paolo D'Amico f654a37077
Fix cypress projectSettings (#2674)
* fix projectSettings

* allow /insights or /demo

* fix

* real fix
2020-12-07 11:53:14 +01:00

26 lines
836 B
JavaScript

describe('Setup', () => {
it('Setup loaded', () => {
cy.get('[data-attr=menu-item-project]').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-project]').click()
cy.get('[data-attr=app-url-suggestion]').click()
cy.get('[data-attr=app-url-item]').contains(/\/insights|\/demo/g)
cy.title().should('equal', 'Project Settings • PostHog')
})
})