fix tests
This commit is contained in:
@@ -12,15 +12,15 @@ context('/api/nodes/task-list', () => {
|
|||||||
|
|
||||||
it('should parse unordered lists correctly', () => {
|
it('should parse unordered lists correctly', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<ul data-type="task_list"><li data-checked="true" data-type="taskItem"><p>Example Text</p></li></ul>')
|
editor.commands.setContent('<ul data-type="taskList"><li data-checked="true" data-type="taskItem"><p>Example Text</p></li></ul>')
|
||||||
expect(editor.getHTML()).to.eq('<ul data-type="task_list"><li data-checked="true" data-type="taskItem"><p>Example Text</p></li></ul>')
|
expect(editor.getHTML()).to.eq('<ul data-type="taskList"><li data-checked="true" data-type="taskItem"><p>Example Text</p></li></ul>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should parse unordered lists without paragraphs correctly', () => {
|
it('should parse unordered lists without paragraphs correctly', () => {
|
||||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||||
editor.commands.setContent('<ul data-type="task_list"><li data-checked="false" data-type="taskItem">Example Text</li></ul>')
|
editor.commands.setContent('<ul data-type="taskList"><li data-checked="false" data-type="taskItem">Example Text</li></ul>')
|
||||||
expect(editor.getHTML()).to.eq('<ul data-type="task_list"><li data-checked="false" data-type="taskItem"><p>Example Text</p></li></ul>')
|
expect(editor.getHTML()).to.eq('<ul data-type="taskList"><li data-checked="false" data-type="taskItem"><p>Example Text</p></li></ul>')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -35,11 +35,11 @@ context('/api/nodes/task-list', () => {
|
|||||||
.click()
|
.click()
|
||||||
|
|
||||||
cy.get('.ProseMirror')
|
cy.get('.ProseMirror')
|
||||||
.find('ul[data-type="task_list"]')
|
.find('ul[data-type="taskList"]')
|
||||||
.should('contain', 'Example Text')
|
.should('contain', 'Example Text')
|
||||||
|
|
||||||
cy.get('.ProseMirror')
|
cy.get('.ProseMirror')
|
||||||
.find('ul[data-type="task_list"] li')
|
.find('ul[data-type="taskList"] li')
|
||||||
.should('contain', 'Example Text')
|
.should('contain', 'Example Text')
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ context('/api/nodes/task-list', () => {
|
|||||||
.click()
|
.click()
|
||||||
|
|
||||||
cy.get('.ProseMirror')
|
cy.get('.ProseMirror')
|
||||||
.find('ul[data-type="task_list"]')
|
.find('ul[data-type="taskList"]')
|
||||||
.should('contain', 'Example Text')
|
.should('contain', 'Example Text')
|
||||||
|
|
||||||
cy.get('.demo__preview button:nth-child(1)')
|
cy.get('.demo__preview button:nth-child(1)')
|
||||||
|
|||||||
Reference in New Issue
Block a user