Skip to content

Commit 0c3face

Browse files
committed
feedback.
1 parent 04d087a commit 0c3face

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/driver/cypress/integration/commands/actions/click_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()

packages/driver/src/cy/ensures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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: {

0 commit comments

Comments
 (0)