fix shortcuts

This commit is contained in:
Philipp Kühn
2020-09-11 23:17:40 +02:00
parent c7af0b6782
commit 7afcb0250e
8 changed files with 38 additions and 20 deletions

View File

@@ -28,17 +28,17 @@ context('/api/extensions/blockquote', () => {
})
it('the keyboard shortcut should make the selected line a blockquote', () => {
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, metaKey: true, key: '9' })
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, modKey: true, key: '9' })
cy.get('.ProseMirror').find('blockquote').should('contain', 'Example Text')
})
it('the keyboard shortcut should toggle the blockquote', () => {
cy.get('.ProseMirror blockquote').should('not.exist')
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, metaKey: true, key: '9' })
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, modKey: true, key: '9' })
cy.get('.ProseMirror').find('blockquote').should('contain', 'Example Text')
cy.get('.ProseMirror').type('{selectall}', { force: true })
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, metaKey: true, key: '9' })
cy.get('.ProseMirror').trigger('keydown', { shiftKey: true, modKey: true, key: '9' })
cy.get('.ProseMirror blockquote').should('not.exist')
})