Merge branch 'main' into feature/vue-node-views
This commit is contained in:
22
docs/src/demos/Examples/Basic/index.spec.js
Normal file
22
docs/src/demos/Examples/Basic/index.spec.js
Normal file
@@ -0,0 +1,22 @@
|
||||
context('/examples/basic', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/basic')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<h1>Example Text</h1>')
|
||||
editor.commands.selectAll()
|
||||
})
|
||||
})
|
||||
|
||||
it('should apply the paragraph style when the keyboard shortcut is pressed', () => {
|
||||
cy.get('.ProseMirror h1').should('exist')
|
||||
cy.get('.ProseMirror p').should('not.exist')
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.trigger('keydown', { modKey: true, altKey: true, key: '0' })
|
||||
.find('p')
|
||||
.should('contain', 'Example Text')
|
||||
})
|
||||
})
|
||||
@@ -1,25 +0,0 @@
|
||||
context('clearContent', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/basic')
|
||||
})
|
||||
|
||||
it('returns true for the clearContent command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<p>Example Text</p>')
|
||||
|
||||
const command = editor.commands.clearContent()
|
||||
|
||||
expect(command).to.be.eq(true)
|
||||
})
|
||||
})
|
||||
|
||||
it('clears the content when using the clearContent command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<p>Example Text</p>')
|
||||
|
||||
editor.commands.clearContent()
|
||||
|
||||
expect(editor.getHTML()).to.be.eq('<p></p>')
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -1,25 +0,0 @@
|
||||
context('insertHTML', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/basic')
|
||||
})
|
||||
|
||||
it('returns true for the insertHTML command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<p>Example Text</p>')
|
||||
|
||||
const command = editor.commands.insertHTML('<p>Cindy Lauper</p>')
|
||||
|
||||
expect(command).to.be.eq(true)
|
||||
})
|
||||
})
|
||||
|
||||
it('appends the content when using the insertHTML command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<p>Example Text</p>')
|
||||
|
||||
editor.commands.insertHTML('<p>Cindy Lauper</p>')
|
||||
|
||||
expect(editor.getHTML()).to.be.eq('<p>Example Text</p><p>Cindy Lauper</p>')
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -1,21 +0,0 @@
|
||||
context('setContent', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/basic')
|
||||
})
|
||||
|
||||
it('returns true for the setContent command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
const command = editor.commands.setContent('<p>Example Text</p>')
|
||||
|
||||
expect(command).to.be.eq(true)
|
||||
})
|
||||
})
|
||||
|
||||
it('clears the content when using the setContent command', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.commands.setContent('<p>Cindy Lauper</p>')
|
||||
|
||||
expect(editor.getHTML()).to.be.eq('<p>Cindy Lauper</p>')
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -2,4 +2,6 @@ context('/examples/collaborative-editing', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/collaborative-editing')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
context('/examples/collaborative-editing-ws', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/collaborative-editing-ws')
|
||||
})
|
||||
})
|
||||
7
docs/src/demos/Examples/Formatting/index.spec.js
Normal file
7
docs/src/demos/Examples/Formatting/index.spec.js
Normal file
@@ -0,0 +1,7 @@
|
||||
context('/examples/formatting', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/formatting')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
7
docs/src/demos/Examples/Links/index.spec.js
Normal file
7
docs/src/demos/Examples/Links/index.spec.js
Normal file
@@ -0,0 +1,7 @@
|
||||
context('/examples/links', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/links')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
@@ -2,4 +2,6 @@ context('/examples/minimalist', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/minimalist')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
|
||||
@@ -2,4 +2,6 @@ context('/examples/todo-app', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/todo-app')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
|
||||
7
docs/src/demos/Examples/VModel/index.spec.js
Normal file
7
docs/src/demos/Examples/VModel/index.spec.js
Normal file
@@ -0,0 +1,7 @@
|
||||
context('/examples/v-model', () => {
|
||||
before(() => {
|
||||
cy.visit('/examples/v-model')
|
||||
})
|
||||
|
||||
// TODO: Write tests
|
||||
})
|
||||
Reference in New Issue
Block a user