Merge branch 'main' into feature/extension-classes
# Conflicts: # packages/core/src/utils/getSchema.ts
This commit is contained in:
@@ -53,20 +53,20 @@ context('/api/extensions/code-block', () => {
|
||||
|
||||
it('the keyboard shortcut should make the selected line a code block', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
|
||||
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
|
||||
.find('pre')
|
||||
.should('contain', 'Example Text')
|
||||
})
|
||||
|
||||
it('the keyboard shortcut should toggle the code block', () => {
|
||||
cy.get('.ProseMirror')
|
||||
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
|
||||
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
|
||||
.find('pre')
|
||||
.should('contain', 'Example Text')
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{selectall}')
|
||||
.trigger('keydown', { shiftKey: true, ctrlKey: true, key: '\\' })
|
||||
.trigger('keydown', { shiftKey: true, modKey: true, key: 'c' })
|
||||
|
||||
cy.get('.ProseMirror pre')
|
||||
.should('not.exist')
|
||||
|
||||
@@ -34,7 +34,7 @@ context('/api/extensions/hard-break', () => {
|
||||
.should('exist')
|
||||
})
|
||||
|
||||
it('the default keyboard shortcut should add a line break', () => {
|
||||
it.skip('the default keyboard shortcut should add a line break', () => {
|
||||
cy.get('.ProseMirror br')
|
||||
.should('not.exist')
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@ context('/api/extensions/heading', () => {
|
||||
'<h1>Example Text</h1>',
|
||||
'<h2>Example Text</h2>',
|
||||
'<h3>Example Text</h3>',
|
||||
'<h4>Example Text</h4>',
|
||||
'<h5>Example Text</h5>',
|
||||
'<h6>Example Text</h6>',
|
||||
]
|
||||
|
||||
headings.forEach(html => {
|
||||
@@ -28,9 +25,9 @@ context('/api/extensions/heading', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should omit invalid headings', () => {
|
||||
it('should omit disabled heading levels', () => {
|
||||
cy.get('.ProseMirror').then(([{ editor }]) => {
|
||||
editor.setContent('<h7>Example Text</h7>')
|
||||
editor.setContent('<h4>Example Text</h4>')
|
||||
expect(editor.html()).to.eq('<p>Example Text</p>')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user