fix shortcuts

This commit is contained in:
Philipp Kühn
2020-09-11 22:02:51 +02:00
parent 66841f2fe2
commit 23ce5bc044
5 changed files with 13 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ context('/api/extensions/history', () => {
})
it('the keyboard shortcut should make the last change undone', () => {
cy.get('.ProseMirror').type('{meta}z', { force: true })
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, keyCode: 90 })
cy.get('.ProseMirror').should('not.contain', 'Mistake')
})
@@ -30,10 +30,10 @@ context('/api/extensions/history', () => {
})
it.skip('the keyboard shortcut should apply the last undone change again', () => {
cy.get('.ProseMirror').type('{meta}z', { force: true })
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, keyCode: 90 })
cy.get('.ProseMirror').should('not.contain', 'Mistake')
cy.get('.ProseMirror').type('{meta}{shift}z', { force: true })
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, shiftKey: true, keyCode: 90 })
cy.get('.ProseMirror').should('contain', 'Mistake')
})
})