mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 02:34:05 +02:00
cypress: shadow-dom example test (#4413)
This commit is contained in:
10
cypress/integration/examples/shadow-dom.ts
Normal file
10
cypress/integration/examples/shadow-dom.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
describe('shadow-dom example', () => {
|
||||
beforeEach(() => cy.visit('examples/shadow-dom'))
|
||||
|
||||
it('renders slate editor inside nested shadow', () => {
|
||||
const outerShadow = cy.dataCy('outer-shadow-root').shadow()
|
||||
const innerShadow = outerShadow.find('> div').shadow()
|
||||
|
||||
innerShadow.findByRole('textbox').should('exist')
|
||||
})
|
||||
})
|
@@ -24,7 +24,7 @@ const ShadowDOM = () => {
|
||||
ReactDOM.render(<ShadowEditor />, reactRoot)
|
||||
})
|
||||
|
||||
return <div ref={container} />
|
||||
return <div ref={container} data-cy="outer-shadow-root" />
|
||||
}
|
||||
|
||||
const ShadowEditor = () => {
|
||||
|
Reference in New Issue
Block a user