diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 0b7c0a66b95e..6db21039841b 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -46,6 +46,7 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr - Elements with `display: contents` will no longer use box model calculations for visibility, and correctly show as visible when it is visible. Fixed in [#29680](https://github.com/cypress-io/cypress/pull/29680). Fixes [#29605](https://github.com/cypress-io/cypress/issues/29605). - The CSS pseudo-class `:dir()` is now supported when testing in Electron. Addresses [#29766](https://github.com/cypress-io/cypress/issues/29766). +- Elements whose parent elements has `overflow: clip` and no height/width will now correctly show as hidden. Fixed in [#29778](https://github.com/cypress-io/cypress/pull/29778). Fixes [#23852](https://github.com/cypress-io/cypress/issues/23852). **Dependency Updates:** diff --git a/packages/driver/cypress/e2e/dom/visibility.cy.ts b/packages/driver/cypress/e2e/dom/visibility.cy.ts index fe82cfb0bd02..e894fa233460 100644 --- a/packages/driver/cypress/e2e/dom/visibility.cy.ts +++ b/packages/driver/cypress/e2e/dom/visibility.cy.ts @@ -2,6 +2,14 @@ const { $, dom } = Cypress describe('src/cypress/dom/visibility', () => { + const add = (el) => { + return $(el).appendTo(cy.$$('body')) + } + + const reasonIs = ($el, str) => { + expect(dom.getReasonIsHidden($el)).to.eq(str) + } + beforeEach(() => { cy.visit('/fixtures/generic.html') }) @@ -163,10 +171,6 @@ describe('src/cypress/dom/visibility', () => { context('hidden/visible overrides', () => { beforeEach(function () { - const add = (el) => { - return $(el).appendTo(cy.$$('body')) - } - // ensure all tests run against a scrollable window const scrollThisIntoView = add('