From 99f3f1889ba12374345766b103c661b29ca375b0 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Wed, 19 Aug 2020 17:57:55 +0200 Subject: [PATCH] minor improvements to the read-only example --- docs/src/demos/ReadOnly/index.spec.js | 13 ++++--------- docs/src/demos/ReadOnly/index.vue | 3 --- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/src/demos/ReadOnly/index.spec.js b/docs/src/demos/ReadOnly/index.spec.js index 96d2394d..9ccac0e6 100644 --- a/docs/src/demos/ReadOnly/index.spec.js +++ b/docs/src/demos/ReadOnly/index.spec.js @@ -3,31 +3,26 @@ context('read-only', () => { cy.visit('/examples/read-only') }) - describe('editable', () => { it('should be editable', () => { cy.get('.ProseMirror').window().then(window => { - const { editor } = window - cy.get('#editable').check() + const { editor } = window editor.insertText('Edited: ') - cy.get('.ProseMirror h2:first') - .should('contain', 'Edited: ') + cy.get('.ProseMirror p:first').should('contain', 'Edited: ') }) }) it('should be read-only', () => { cy.get('.ProseMirror').window().then(window => { - const { editor } = window - cy.get('#editable').uncheck() + const { editor } = window editor.insertText('Edited: ') - cy.get('.ProseMirror h2:first') - .should('not.contain', 'Edited: ') + cy.get('.ProseMirror p:first').should('not.contain', 'Edited: ') }) }) diff --git a/docs/src/demos/ReadOnly/index.vue b/docs/src/demos/ReadOnly/index.vue index 5c0f6aa0..c8cd06d5 100644 --- a/docs/src/demos/ReadOnly/index.vue +++ b/docs/src/demos/ReadOnly/index.vue @@ -27,9 +27,6 @@ export default { this.editor = new Editor({ editable: false, content: ` -

- Read-Only -

This text is read-only. You are not able to edit something. Links to fancy websites are still working.