tiptap/demos/src/Examples/InteractivityComponent/Vue/index.spec.js
Patrick Baber 614fc8082c
feat: add tiptap class
* update docs
* update demos
2023-05-25 13:45:06 +02:00

28 lines
872 B
JavaScript

context('/src/Examples/InteractivityComponent/Vue/', () => {
beforeEach(() => {
cy.visit('/src/Examples/InteractivityComponent/Vue/')
})
it('should have a working tiptap instance', () => {
cy.get('.tiptap').then(([{ editor }]) => {
// eslint-disable-next-line
expect(editor).to.not.be.null
})
})
it('should render a custom node', () => {
cy.get('.tiptap .vue-component').should('have.length', 1)
})
it('should handle count click inside custom node', () => {
cy.get('.tiptap .vue-component button')
.should('have.text', 'This button has been clicked 0 times.')
.click()
.should('have.text', 'This button has been clicked 1 times.')
.click()
.should('have.text', 'This button has been clicked 2 times.')
.click()
.should('have.text', 'This button has been clicked 3 times.')
})
})