diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml
index 5eaf04b31f14..fc3953d5f6b4 100644
--- a/.circleci/workflows.yml
+++ b/.circleci/workflows.yml
@@ -30,9 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- - 'chore/update_vue_test_utils'
- - 'publish-binary'
- - 'chore/fix_windows_kitchensink'
+ - 'mschile/issue-30922'
# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
@@ -43,8 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- - equal: [ 'chore/update_vue_test_utils', << pipeline.git.branch >> ]
- - equal: [ 'cacie/fix-hook-test-stack-analysis', << pipeline.git.branch >> ]
+ - equal: [ 'mschile/issue-30922', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
@@ -55,8 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- - equal: [ 'chore/update_binary_branch', << pipeline.git.branch >> ]
- - equal: [ 'cacie/fix-hook-test-stack-analysis', << pipeline.git.branch >> ]
+ - equal: [ 'mschile/issue-30922', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
@@ -79,8 +75,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- - equal: [ 'ryanm/chore/electron-33-upgrade', << pipeline.git.branch >> ]
- - equal: [ 'chore/fix_windows_kitchensink', << pipeline.git.branch >> ]
+ - equal: [ 'mschile/issue-30922', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
@@ -156,7 +151,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
- echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "chore/update_vue_test_utils" && "$CIRCLE_BRANCH" != chore/fix_windows_kitchensink ]]; then
+ echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mschile/issue-30922" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md
index 73d348db324e..7a16a2fc946c 100644
--- a/cli/CHANGELOG.md
+++ b/cli/CHANGELOG.md
@@ -6,6 +6,9 @@ _Released 1/28/2025 (PENDING)_
**Bugfixes:**
- Fixed an issue where Cypress would incorrectly navigate to `about:blank` when test isolation was disabled and the last test would fail and then retry. Fixes [#28527](https://github.com/cypress-io/cypress/issues/28527).
+- Fixed a regression introduced in [`14.0.0`](https://docs.cypress.io/guides/references/changelog#14-0-0) where an element would not return the correct visibility if its offset parent was within the clipping element. Fixes [#30922](https://github.com/cypress-io/cypress/issues/30922).
+- Fixed a regression introduced in [`14.0.0`](https://docs.cypress.io/guides/references/changelog#14-0-0) where the incorrect visiblity would be returned when either `overflow-x` or `overflow-y` was visible but the other one was clipping. Fixed in [#30934](https://github.com/cypress-io/cypress/pull/30934).
+- Fixed an issue where an `option` element would not return the correct visibility if its parent element has a clipping overflow. Fixed in [#30934](https://github.com/cypress-io/cypress/pull/30934).
- Fixed an issue where non-HTMLElement(s) may fail during assertions. Fixes [#30944](https://github.com/cypress-io/cypress/issues/30944)
**Misc:**
diff --git a/packages/driver/cypress/e2e/dom/visibility.cy.ts b/packages/driver/cypress/e2e/dom/visibility.cy.ts
index 50f7a86f7708..43c7e31bbbfb 100644
--- a/packages/driver/cypress/e2e/dom/visibility.cy.ts
+++ b/packages/driver/cypress/e2e/dom/visibility.cy.ts
@@ -6,7 +6,7 @@ describe('src/cypress/dom/visibility', () => {
return $(el).appendTo(cy.$$('body'))
}
- const reasonIs = ($el, str) => {
+ const reasonIs = ($el: JQuery, str: string) => {
expect(dom.getReasonIsHidden($el)).to.eq(str)
}
@@ -995,10 +995,6 @@ describe('src/cypress/dom/visibility', () => {
})
it('is visible when element is statically positioned and parent element is absolutely positioned and ancestor has overflow hidden', function () {
- const add = (el) => {
- return $(el).appendTo(cy.$$('body'))
- }
-
cy.$$('body').empty()
const el = add(`
@@ -1015,10 +1011,6 @@ describe('src/cypress/dom/visibility', () => {
})
it('is visible when element is relatively positioned and parent element is absolutely positioned and ancestor has overflow auto', function () {
- const add = (el) => {
- return $(el).appendTo(cy.$$('body'))
- }
-
cy.$$('body').empty()
const el = add(`
@@ -1043,6 +1035,185 @@ describe('src/cypress/dom/visibility', () => {
expect(el.find('#visible-button')).to.be.visible
})
+
+ it('is hidden when parent element is absolutely position and offset parent is a decendent of the ancestor', function () {
+ cy.$$('body').empty()
+
+ add(`
+
+ `)
+
+ cy.contains('test-2').should('not.be.visible')
+ cy.contains('test-1').should('be.visible')
+ })
+
+ it('is hidden when element is an option and the parent has overflow clip', function () {
+ cy.$$('body').empty()
+
+ add(`
+