async beforeeach

This commit is contained in:
Hans Pagel
2020-09-11 16:24:37 +02:00
parent 3e0e3b73e6
commit c4d02c291c
11 changed files with 32 additions and 26 deletions

View File

@@ -3,11 +3,11 @@ context('/examples/basic', () => {
cy.visit('/examples/basic')
})
beforeEach(() => {
beforeEach((done) => {
cy.get('.ProseMirror').window().then(window => {
const { editor } = window
editor.setContent('<p>foo</p>')
cy.wait(10)
done()
})
})

View File

@@ -3,11 +3,11 @@ context('/examples/markdown-shortcuts', () => {
cy.visit('/examples/markdown-shortcuts')
})
beforeEach(() => {
beforeEach((done) => {
cy.get('.ProseMirror').window().then(window => {
const { editor } = window
editor.clearContent()
cy.wait(10)
done()
})
})