really fix tests
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
context('/api/extensions/hard-break', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/hard-break')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
})
|
||||
})
|
||||
|
||||
describe('hard-break', () => {
|
||||
it('the button should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.demo__preview button:first').click({ force: true })
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
it('the button should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.demo__preview button:first').click({ force: true })
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
|
||||
it('the default keyboard shortcut should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.ProseMirror').type('{shift}{enter}', {force: true})
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
it('the default keyboard shortcut should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.ProseMirror').type('{shift}{enter}', { force: true })
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
|
||||
it('the alternative keyboard shortcut should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.ProseMirror').type('{meta}{enter}', {force: true})
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
it('the alternative keyboard shortcut should add a line break', () => {
|
||||
cy.get('.ProseMirror br').should('not.exist')
|
||||
cy.get('.ProseMirror').type('{meta}{enter}', { force: true })
|
||||
cy.get('.ProseMirror br').should('exist')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user