add keyboard shortcut tests to the history extension
This commit is contained in:
@@ -10,12 +10,12 @@ context('/api/extensions/italic', () => {
|
||||
})
|
||||
|
||||
describe('italic', () => {
|
||||
it('should make the selected text italic', () => {
|
||||
it('the button should make the selected text italic', () => {
|
||||
cy.get('.demo__preview button:first').click({ force: true })
|
||||
cy.get('.ProseMirror').contains('em', 'Example Text')
|
||||
})
|
||||
|
||||
it('should toggle the selected text italic', () => {
|
||||
it('the button should toggle the selected text italic', () => {
|
||||
cy.get('.demo__preview button:first').dblclick({ force: true })
|
||||
cy.get('.ProseMirror em').should('not.exist')
|
||||
})
|
||||
@@ -27,7 +27,7 @@ context('/api/extensions/italic', () => {
|
||||
cy.get('.ProseMirror').contains('em', 'Example Text')
|
||||
})
|
||||
|
||||
it('the button should toggle the selected text italic', () => {
|
||||
it('the keyboard shortcut should toggle the selected text italic', () => {
|
||||
const shortcut = Cypress.platform === 'darwin' ? '{meta}i' : '{ctrl}i'
|
||||
|
||||
cy.get('.ProseMirror').type(shortcut, {force: true}).type(shortcut, {force: true})
|
||||
|
||||
Reference in New Issue
Block a user