add a lot more parseDOM tests to all extensions

This commit is contained in:
Hans Pagel
2020-10-08 14:15:02 +02:00
parent 2282beae07
commit 0e48b8e6f6
14 changed files with 226 additions and 3 deletions

View File

@@ -9,6 +9,19 @@ context('/api/extensions/paragraph', () => {
})
})
it('should parse paragraphs correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p>Example Text</p>')
expect(editor.html()).to.eq('<p>Example Text</p>')
editor.setContent('<p><x-unknown>Example Text</x-unknown></p>')
expect(editor.html()).to.eq('<p>Example Text</p>')
editor.setContent('<p style="display: block;">Example Text</p>')
expect(editor.html()).to.eq('<p>Example Text</p>')
})
})
it('text should be wrapped in a paragraph by default', () => {
cy.get('.ProseMirror')
.type('Example Text')