change keyboard shortcut for code blocks, should fix tests

This commit is contained in:
Hans Pagel
2020-10-12 20:28:04 +02:00
parent a237db377b
commit 3e3f4444e4
3 changed files with 6 additions and 5 deletions

View File

@@ -53,20 +53,20 @@ context('/api/extensions/code-block', () => {
it('the keyboard shortcut should make the selected line a code block', () => {
cy.get('.ProseMirror')
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
.find('pre')
.should('contain', 'Example Text')
})
it('the keyboard shortcut should toggle the code block', () => {
cy.get('.ProseMirror')
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
.find('pre')
.should('contain', 'Example Text')
cy.get('.ProseMirror')
.type('{selectall}')
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
cy.get('.ProseMirror pre')
.should('not.exist')