1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-22 08:02:25 +01:00
slate/cypress/integration/readonly.ts
Julian Krispel-Samsel 602f170156
Update readonly example and add test (#4212)
* fixes #4039, update readonly example

* add cypress test for readonly mode
2021-04-21 09:29:19 +01:00

11 lines
314 B
TypeScript

describe('readonly editor', () => {
it('should not be editable', () => {
cy.visit('examples/read-only')
.get('[data-slate-editor="true"]')
.should('not.have.attr', 'contentEditable', 'true')
.should('not.have.attr', 'role', 'textbox')
.click()
.should('not.be.focused')
})
})