store editor in dom element

This commit is contained in:
Philipp Kühn
2020-09-11 18:06:13 +02:00
parent e0993a135a
commit 808b806db8
18 changed files with 45 additions and 58 deletions

View File

@@ -4,8 +4,7 @@ context('/examples/focus', () => {
})
it('should have class', () => {
cy.get('.ProseMirror').window().then(window => {
const { editor } = window
cy.get('.ProseMirror').then(([{ editor }]) => {
editor.focus('start')
cy.get('.ProseMirror p:first').should('have.class', 'has-focus')