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

@@ -64,15 +64,15 @@ context('/api/marks/strike', () => {
it('the keyboard shortcut should strike the selected text', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, key: 'd' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'x' })
.find('s')
.should('contain', 'Example Text')
})
it('the keyboard shortcut should toggle the selected text striked', () => {
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, key: 'd' })
.trigger('keydown', { modKey: true, key: 'd' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'x' })
.trigger('keydown', { modKey: true, shiftKey: true, key: 'x' })
.find('s')
.should('not.exist')
})