Files
tiptap/demos/src/Examples/Default/Vue/index.spec.js
Philipp Kühn 2d129459ca fix tests
2021-08-26 14:07:37 +02:00

23 lines
649 B
JavaScript

context('/src/Examples/Default/Vue/', () => {
before(() => {
cy.visit('/src/Examples/Default/Vue/')
})
beforeEach(() => {
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.commands.setContent('<h1>Example Text</h1>')
cy.get('.ProseMirror').type('{selectall}')
})
})
it('should apply the paragraph style when the keyboard shortcut is pressed', () => {
cy.get('.ProseMirror h1').should('exist')
cy.get('.ProseMirror p').should('not.exist')
cy.get('.ProseMirror')
.trigger('keydown', { modKey: true, altKey: true, key: '0' })
.find('p')
.should('contain', 'Example Text')
})
})