Add e2e test

This commit is contained in:
Alexander Satretdinov 2022-08-07 10:52:50 +03:00
parent 24ce5e8ae9
commit b1b4564931
No known key found for this signature in database
GPG key ID: 1604320999993492

View file

@ -47,4 +47,18 @@ describe('ReadOnly API spec', () => {
});
});
});
it('should add default block when block list is empty', () => {
createEditor({ readOnly: true });
cy
.get<EditorJS>('@editorInstance')
.then(async editor => {
editor.readOnly.toggle(false).then(() => {
cy.get('[data-cy=editorjs').click();
expect(editor.readOnly.isEnabled).to.be.false;
});
});
});
});