0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
posthog/cypress/integration/projectSettings.js
Michael Matloka 33823e8648
Refactor sceneLogic to TypeScript and add dynamic page title (#2361)
* Refactor sceneLogic to TypeScript and add dynamic page title

* Add Cypress checks

* Run prettier

* Fix Cypress checks

* Improve camelCaseToTitle JSDoc

* Move "PostHog" to end of page title

* Use bullet

* Remove actions

* Rerun tests

* Fix new Events page after merge conflict
2020-11-13 17:50:23 +01:00

25 lines
831 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]').should('contain', '/demo')
cy.title().should('equal', 'Project Settings • PostHog')
})
})