fix shortcuts
This commit is contained in:
@@ -24,13 +24,13 @@ context('/api/extensions/italic', () => {
|
||||
})
|
||||
|
||||
it('the keyboard shortcut should make the selected text italic', () => {
|
||||
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror').trigger('keydown', { modKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror').find('em').should('contain', 'Example Text')
|
||||
})
|
||||
|
||||
it('the keyboard shortcut should toggle the selected text italic', () => {
|
||||
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror').trigger('keydown', { metaKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror').trigger('keydown', { modKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror').trigger('keydown', { modKey: true, key: 'i' })
|
||||
cy.get('.ProseMirror em').should('not.exist')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user