add a bunch of new tests and add empty test files where missing
This commit is contained in:
21
docs/src/tests/core/commands/setContent.spec.js
Normal file
21
docs/src/tests/core/commands/setContent.spec.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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>')
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user