refactoring

This commit is contained in:
Philipp Kühn
2020-09-15 00:07:00 +02:00
parent 61ca7d4377
commit 71cc626b0a
12 changed files with 307 additions and 123 deletions

View File

@@ -10,20 +10,35 @@ context('/api/extensions/hard-break', () => {
})
it('the button should add a line break', () => {
cy.get('.ProseMirror br').should('not.exist')
cy.get('.demo__preview button:first').click({ force: true })
cy.get('.ProseMirror br').should('exist')
cy.get('.ProseMirror br')
.should('not.exist')
cy.get('.demo__preview button:first')
.click({ force: true })
cy.get('.ProseMirror br')
.should('exist')
})
it('the default keyboard shortcut should add a line break', () => {
cy.get('.ProseMirror br').should('not.exist')
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, key: 'Enter' })
cy.get('.ProseMirror br').should('exist')
cy.get('.ProseMirror br')
.should('not.exist')
cy.get('.ProseMirror')
.trigger('keydown', { shiftKey: true, key: 'Enter' })
cy.get('.ProseMirror br')
.should('exist')
})
it('the alternative keyboard shortcut should add a line break', () => {
cy.get('.ProseMirror br').should('not.exist')
cy.get('.ProseMirror').trigger('keydown', { modKey: true, key: 'Enter' })
cy.get('.ProseMirror br').should('exist')
cy.get('.ProseMirror br')
.should('not.exist')
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, key: 'Enter' })
cy.get('.ProseMirror br')
.should('exist')
})
})