File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
cypress/integration/commands/actions Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3987,7 +3987,7 @@ describe('shadow dom', () => {
39873987 } )
39883988
39893989 // https://github.com/cypress-io/cypress/issues/18008
3990- it ( 'ignores the covering shadow host' , ( ) => {
3990+ it ( 'does not fail actionability check when element is covered by its shadow host' , ( ) => {
39913991 cy . visit ( '/fixtures/shadow-dom-button.html' )
39923992
39933993 cy . get ( '#element' ) . shadow ( ) . find ( '[data-test-id="my-button"]' ) . click ( )
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ export const create = (state, expect) => {
332332 // when an element inside a shadow root is covered by its shadow host
333333 if (
334334 $dom . isWithinShadowRoot ( $el1 . get ( 0 ) ) &&
335- $el1 . get ( 0 ) . getRootNode ( ) === $el2 . get ( 0 ) . shadowRoot
335+ $el1 . get ( 0 ) . getRootNode ( ) === $el2 ? .get ( 0 ) . shadowRoot
336336 ) {
337337 return
338338 }
@@ -341,7 +341,7 @@ export const create = (state, expect) => {
341341 const element1 = $dom . stringify ( $el1 )
342342 const element2 = $dom . stringify ( $el2 )
343343
344- return $errUtils . throwErrByPath ( 'dom.covered' , {
344+ $errUtils . throwErrByPath ( 'dom.covered' , {
345345 onFail,
346346 args : { cmd, element1, element2 } ,
347347 errProps : {
You can’t perform that action at this time.
0 commit comments