0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
posthog/cypress/e2e/insightsPremium.cy.ts
2022-12-30 21:27:26 +01:00

32 lines
1.1 KiB
TypeScript

describe('Insights Premium Features', () => {
beforeEach(() => {
cy.clickNavMenu('insight')
cy.location('pathname').should('include', '/insights')
})
xit('Tag insight', () => {
const newTag = `test-${Math.floor(Math.random() * 10000)}`
cy.get('[data-attr=button-add-tag]').click()
cy.focused().type(newTag)
cy.get('[data-attr=new-tag-option]').click()
cy.get('.ant-tag').should('contain', newTag)
cy.wait(300)
cy.get('.new-tag-input').should('not.exist') // Input should disappear
})
xit('Cannot add duplicate tags', () => {
const newTag = `test2-${Math.floor(Math.random() * 10000)}`
cy.get('[data-attr=button-add-tag]').click()
cy.focused().type(newTag)
cy.get('[data-attr=new-tag-option]').click()
cy.get('.ant-tag').should('contain', newTag)
cy.wait(300)
cy.get('[data-attr=button-add-tag]').click()
cy.focused().type(newTag)
cy.get('[data-attr=new-tag-option]').click()
cy.get('.Toastify__toast--error').should('be.visible')
})
})