2021-08-12 23:55:11 +02:00
|
|
|
describe('Insights Premium Features', () => {
|
|
|
|
beforeEach(() => {
|
2021-11-25 15:39:49 +01:00
|
|
|
cy.clickNavMenu('insight')
|
2021-08-12 23:55:11 +02:00
|
|
|
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')
|
|
|
|
})
|
|
|
|
})
|