tiptap/demos/src/Examples/Transition/Vue/index.spec.js
Éric Le Maître 364231a1bd
Fix editor destruction at the end of Vue transition (#5648)
* wip: destruction éditeur

* fix: replacing DOM nodes at unmount

* fix: event for useEditor destroy

* chore: Generating changeset

* chore: generating changeset

* chore: delete duplicate changeset

* revert: note tutorial

* feat: add Vue transition example

* fix: test for Vue transition

* fix: components within editor

* chore: remove useless ref
2024-10-14 10:26:12 +02:00

30 lines
712 B
JavaScript

context('/src/Examples/Transition/Vue/', () => {
beforeEach(() => {
cy.visit('/src/Examples/Transition/Vue/')
})
it('should not have an active tiptap instance but a button', () => {
cy.get('.tiptap').should('not.exist')
cy.get('button').should('exist')
})
it('clicking the button should show the editor', () => {
cy.get('button').click()
cy.get('.tiptap').should('exist')
cy.get('.tiptap').should('be.visible')
})
it('clicking the button again should hide the editor', () => {
cy.get('button').click()
cy.get('.tiptap').should('exist')
cy.get('.tiptap').should('be.visible')
cy.get('button').click()
cy.get('.tiptap').should('not.exist')
})
})