tiptap/demos/src/Demos/CollaborationSplitPane/React/index.spec.js

25 lines
658 B
JavaScript

context('/src/Demos/CollaborationSplitPane/React/', () => {
beforeEach(() => {
cy.visit('/src/Demos/CollaborationSplitPane/React/')
})
it('should have a working tiptap instance', () => {
cy.get('.tiptap').then(([{ editor }]) => {
// eslint-disable-next-line
expect(editor).to.not.be.null
})
})
it('should have a ydoc', () => {
cy.get('.tiptap').then(([{ editor }]) => {
/**
* @type {import('yjs').Doc}
*/
const yDoc = editor.extensionManager.extensions.find(a => a.name === 'collaboration').options.document
// eslint-disable-next-line
expect(yDoc).to.not.be.null
})
})
})