rework keyboard shortcuts

This commit is contained in:
Hans Pagel
2020-11-19 01:16:10 +01:00
parent 56f1726850
commit a4cc02cff6
25 changed files with 211 additions and 83 deletions

View File

@@ -124,15 +124,15 @@ context('/api/marks/highlight', () => {
it('the keyboard shortcut should highlight the selected text', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, key: 'e' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'h' })
.find('mark')
.should('contain', 'Example Text')
})
it('the keyboard shortcut should toggle the selected text highlighted', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, key: 'e' })
.trigger('keydown', { modKey: true, key: 'e' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'h' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'h' })
.find('mark')
.should('not.exist')
})