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

@@ -10,6 +10,20 @@ context('/api/extensions/underline', () => {
})
})
it('should parse u tags correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p><u>Example Text</u></p>')
expect(editor.html()).to.eq('<p><u>Example Text</u></p>')
})
})
it('should transform any tag with text decoration underline to u tags', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p><span style="text-decoration: underline">Example Text</span></p>')
expect(editor.html()).to.eq('<p><u>Example Text</u></p>')
})
})
it('the button should underline the selected text', () => {
cy.get('.demo__preview button:first')
.click()