fix tests
This commit is contained in:
@@ -1,25 +1,31 @@
|
||||
context('/examples/history', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/examples/history')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.clearContent()
|
||||
})
|
||||
})
|
||||
|
||||
it('should not have a mistake', () => {
|
||||
cy.get('.ProseMirror').then(() => {
|
||||
cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake')
|
||||
cy.get('.ProseMirror').should('not.contain', 'Mistake')
|
||||
})
|
||||
})
|
||||
|
||||
it('should have a mistake', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.insertText('Mistake')
|
||||
cy.get('.ProseMirror h2:first').should('contain', 'Mistake')
|
||||
cy.get('.ProseMirror').should('contain', 'Mistake')
|
||||
})
|
||||
})
|
||||
|
||||
it('the mistake should be removed again', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.undo()
|
||||
cy.get('.ProseMirror h2:first').should('not.contain', 'Mistake')
|
||||
cy.get('.ProseMirror').should('not.contain', 'Mistake')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user