diff --git a/docs/src/demos/Examples/Basic/index.spec.js b/docs/src/demos/Examples/Basic/index.spec.js deleted file mode 100644 index 04581551..00000000 --- a/docs/src/demos/Examples/Basic/index.spec.js +++ /dev/null @@ -1,82 +0,0 @@ -context('/examples/basic', () => { - before(() => { - cy.visit('/examples/basic') - }) - - beforeEach((done) => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - editor.setContent('

foo

') - done() - }) - }) - - it('should return html', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - const html = editor.html() - - expect(html).to.equal('

foo

') - }) - }) - - it('should return json', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - const json = editor.json() - - expect(json).to.deep.equal({ - type: 'document', - content: [ - { - type: 'paragraph', - content: [ - { - type: 'text', - text: 'foo' - } - ] - } - ] - }) - }) - }) - - it('should prepend', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - - editor.focus(1).insertText('bar') - cy.get('.ProseMirror p:first').should('contain', 'barfoo') - }) - }) - - it('should append', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - - editor.focus('end').insertText('bar') - cy.get('.ProseMirror p:first').should('contain', 'foobar') - }) - }) - - it('should prepend', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - - editor.focus('start').insertHTML('

bar

') - cy.get('.ProseMirror p:first').should('contain', 'bar').should('not.contain', 'foo') - cy.get('.ProseMirror p:last').should('contain', 'foo').should('not.contain', 'bar') - }) - }) - - it('should append', () => { - cy.get('.ProseMirror').window().then(window => { - const { editor } = window - - editor.focus('end').insertHTML('

bar

') - cy.get('.ProseMirror p:first').should('contain', 'foo').should('not.contain', 'bar') - cy.get('.ProseMirror p:last').should('contain', 'bar').should('not.contain', 'foo') - }) - }) -}) \ No newline at end of file