2020-08-04 14:46:08 +02:00
|
|
|
describe('Toolbar', () => {
|
|
|
|
it('Toolbar loads', () => {
|
2022-07-13 15:37:53 +02:00
|
|
|
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')
|
|
|
|
})
|
2020-08-04 14:46:08 +02:00
|
|
|
})
|
2022-06-20 11:04:29 +02:00
|
|
|
|
2022-06-21 09:10:29 +02:00
|
|
|
it('toolbar item in sidebar has launch options', () => {
|
2022-06-20 11:04:29 +02:00
|
|
|
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')
|
|
|
|
})
|
2020-08-04 14:46:08 +02:00
|
|
|
})
|