mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
add before method again
This commit is contained in:
parent
464d3665db
commit
a3466f1add
@ -1,10 +1,13 @@
|
||||
context('/examples/markdown-shortcuts', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/examples/markdown-shortcuts')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.clearContent()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/blockquote', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/blockquote')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/bold', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/bold')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
@ -34,6 +37,7 @@ context('/api/extensions/bold', () => {
|
||||
|
||||
cy.get('.ProseMirror')
|
||||
.type('{meta}b', { force: true })
|
||||
.should('not.exist')
|
||||
|
||||
cy.get('.ProseMirror strong').should('not.exist')
|
||||
})
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/code', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/code')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/code-block', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/code-block')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
context('/api/extensions/hard-break', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/hard-break')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/heading', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/heading')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
context('/api/extensions/history', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/history')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Mistake</p>')
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
context('/api/extensions/horizontal-rule', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/horizontal-rule')
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/italic', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/italic')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
context('/api/extensions/paragraph', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/paragraph')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.clearContent()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/strike', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/strike')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1,11 +1,14 @@
|
||||
context('/api/extensions/underline', () => {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.visit('/api/extensions/underline')
|
||||
})
|
||||
|
||||
beforeEach((done) => {
|
||||
cy.get('.ProseMirror').window().then(window => {
|
||||
const { editor } = window
|
||||
editor.setContent('<p>Example Text</p>')
|
||||
editor.selectAll()
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user