update some tests

This commit is contained in:
Philipp Kühn
2020-09-11 21:04:55 +02:00
parent 8df2a5d25e
commit 46cee66db9
4 changed files with 13 additions and 18 deletions

View File

@@ -13,15 +13,14 @@ context('/api/extensions/paragraph', () => {
it('text should be wrapped in a paragraph by default', () => {
cy.get('.ProseMirror').type('Example Text', { force: true })
cy.get('.ProseMirror').contains('p', 'Example Text')
cy.get('.ProseMirror').find('p').should('have.length', 1)
cy.get('.ProseMirror').find('p').should('contain', 'Example Text')
})
it('enter should make a new paragraph', () => {
cy.get('.ProseMirror').type('First Paragraph{enter}Second Paragraph', { force: true })
cy.get('.ProseMirror').find('p').should('have.length', 2)
cy.get('.ProseMirror').contains('p:first', 'First Paragraph')
cy.get('.ProseMirror').contains('p:nth-child(2)', 'Second Paragraph')
cy.get('.ProseMirror').find('p:first').should('contain', 'First Paragraph')
cy.get('.ProseMirror').find('p:nth-child(2)').should('contain', 'Second Paragraph')
})
it('backspace should remove the second paragraph', () => {