mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 18:26:15 +01:00
3d8f8dfe26
* perf(decide): Speed up decide endpoint by shortcircuiting middleware * fix cypress tests
25 lines
1009 B
JavaScript
25 lines
1009 B
JavaScript
describe('Toolbar', () => {
|
|
it('Toolbar loads', () => {
|
|
cy.get('[data-attr="menu-item-toolbar-launch"]').click()
|
|
cy.get('[data-attr="sidebar-launch-toolbar"]').contains('Add toolbar URL').click()
|
|
cy.location().then((loc) => {
|
|
cy.get('[data-attr="url-input"]').clear().type(`http://${loc.host}/demo`)
|
|
cy.get('[data-attr="url-save"]').click()
|
|
cy.get('[data-attr="toolbar-open"]')
|
|
.first()
|
|
.parent()
|
|
.invoke('attr', 'href')
|
|
.then((href) => {
|
|
cy.visit(href)
|
|
})
|
|
cy.get('#__POSTHOG_TOOLBAR__').shadow().find('div').should('exist')
|
|
})
|
|
})
|
|
|
|
it('toolbar item in sidebar has launch options', () => {
|
|
cy.get('[data-attr="menu-item-toolbar-launch"]').click()
|
|
cy.get('[data-attr="sidebar-launch-toolbar"]').contains('Add toolbar URL').click()
|
|
cy.location('pathname').should('include', '/toolbar')
|
|
})
|
|
})
|