Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: non-HTMLElement(s) fail during assertions #30947

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Jan 25, 2025

Additional details

In a previous PR the transform logic was updated to directly check $el[0].style.transform. However, it's possible that $el[0] is a standard Element and does not have the style property which leads to an error.

Reverted the transform logic to what is was before but kept the defaulting to none if the getPropertyValue('transform') returns an empty string.

Steps to test

Assert on a non-HTMLElement and verifies it does not error.

How has the user experience changed?

No longer errors.

PR Tasks

@mschile mschile self-assigned this Jan 25, 2025
Copy link

cypress bot commented Jan 25, 2025

cypress    Run #60048

Run Properties:  status check passed Passed #60048  •  git commit d426f5f184: updates
Project cypress
Branch Review mschile/issue-30944
Run status status check passed Passed #60048
Run duration 17m 37s
Commit git commit d426f5f184: updates
Committer Matthew Schile
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 1099
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 26481
View all changes introduced in this branch ↗︎
UI Coverage  45.43%
  Untested elements 192  
  Tested elements 164  
Accessibility  92.54%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 888  

@@ -6,6 +6,7 @@ _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 an issue where non-HTMLElement(s) may failing during assertions. Fixes [#30944](https://github.com/cypress-io/cypress/issues/30944)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Fixed an issue where non-HTMLElement(s) may failing during assertions. Fixes [#30944](https://github.com/cypress-io/cypress/issues/30944)
- Fixed an issue where non-HTMLElement(s) may fail during assertions. Fixes [#30944](https://github.com/cypress-io/cypress/issues/30944)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress v14 expect bug on DOM documents
2 participants