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,20 @@ context('/api/extensions/hard-break', () => {
})
})
it('should parse hard breaks correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p>Example<br>Text</p>')
expect(editor.html()).to.eq('<p>Example<br>Text</p>')
})
})
it('should parse hard breaks with self-closing tag correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p>Example<br />Text</p>')
expect(editor.html()).to.eq('<p>Example<br>Text</p>')
})
})
it('the button should add a line break', () => {
cy.get('.ProseMirror br')
.should('not.exist')