test inline code keyboard shortcuts

This commit is contained in:
Hans Pagel
2020-11-20 13:56:52 +01:00
parent 683e7f112e
commit 86219a3ed1
7 changed files with 29 additions and 124 deletions

View File

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