fix tests

This commit is contained in:
Philipp Kühn
2020-11-13 12:33:25 +01:00
parent e548181455
commit 2cf8137def
25 changed files with 103 additions and 103 deletions

View File

@@ -5,21 +5,21 @@ context('/api/nodes/ordered-list', () => {
beforeEach(() => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<p>Example Text</p>')
editor.selectAll()
editor.commands.setContent('<p>Example Text</p>')
editor.commands.selectAll()
})
})
it('should parse ordered lists correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<ol><li><p>Example Text</p></li></ol>')
editor.commands.setContent('<ol><li><p>Example Text</p></li></ol>')
expect(editor.getHTML()).to.eq('<ol><li><p>Example Text</p></li></ol>')
})
})
it('should parse ordered lists without paragraphs correctly', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.setContent('<ol><li>Example Text</li></ol>')
editor.commands.setContent('<ol><li>Example Text</li></ol>')
expect(editor.getHTML()).to.eq('<ol><li><p>Example Text</p></li></ol>')
})
})
@@ -63,7 +63,7 @@ context('/api/nodes/ordered-list', () => {
it('should leave the list with double enter', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()
editor.commands.clearContent()
})
cy.get('.ProseMirror')
@@ -81,7 +81,7 @@ context('/api/nodes/ordered-list', () => {
it('should make a ordered list from a number', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()
editor.commands.clearContent()
})
cy.get('.ProseMirror')
@@ -98,7 +98,7 @@ context('/api/nodes/ordered-list', () => {
it('should remove the ordered list after pressing backspace', () => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.clearContent()
editor.commands.clearContent()
})
cy.get('.ProseMirror')