Skip to content

Commit

Permalink
Merge branch 'develop' into mschile/issue-30922
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile authored Jan 27, 2025
2 parents 5cef570 + 1548047 commit 6146fc0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ _Released 1/28/2025 (PENDING)_
- 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:**

Expand Down
11 changes: 11 additions & 0 deletions packages/driver/cypress/e2e/commands/assertions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,17 @@ describe('src/cy/commands/assertions', () => {
expect(2n).to.equal(2n)
})

it('handles non-HTMLElement(s) (e.g. Element)', () => {
const xml = '<?xml version="1.0" encoding="UTF-8"?><foo><bar>Bar</bar></foo>'
const parser = new DOMParser()
const doc = parser.parseFromString(xml, 'application/xml')
const foo = doc.getElementsByTagName('foo')[0]

expect(foo).not.to.be.undefined
expect(foo).to.be.instanceOf(Element)
expect(foo).not.to.be.instanceOf(HTMLElement)
})

it('#consoleProps for regular objects', (done) => {
cy.on('log:added', (attrs, log) => {
if (attrs.name === 'assert') {
Expand Down
8 changes: 3 additions & 5 deletions packages/driver/src/dom/visibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,11 @@ const elHasNoEffectiveWidthOrHeight = ($el: JQuery) => {
// display:none elements, and generally any elements that are not directly rendered,
// an empty list is returned.
const el = $el[0]
let transform

if ($el[0].style.transform) {
const style = getComputedStyle(el)
const style = getComputedStyle(el)
let transform = style.getPropertyValue('transform')

transform = style.getPropertyValue('transform')
} else {
if (!transform.length) {
transform = 'none'
}

Expand Down

4 comments on commit 6146fc0

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6146fc0 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.1/linux-x64/mschile/issue-30922-6146fc00fe3c641da5115126b3b1a92a11e6f57f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6146fc0 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.1/linux-arm64/mschile/issue-30922-6146fc00fe3c641da5115126b3b1a92a11e6f57f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6146fc0 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.1/win32-x64/mschile/issue-30922-6146fc00fe3c641da5115126b3b1a92a11e6f57f/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 6146fc0 Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/14.0.1/darwin-arm64/mschile/issue-30922-6146fc00fe3c641da5115126b3b1a92a11e6f57f/cypress.tgz

Please sign in to comment.