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: #29093 for elements with length in rem #29224
base: develop
Are you sure you want to change the base?
The head ref may contain hidden characters: "issue-29093-fix-Visible-elements-are-\"not-visible\"-for-Cypress"
fix: #29093 for elements with length in rem #29224
Conversation
|
…-visible"-for-Cypress
changelog update
fix pipeline bug
fix pipeline for line2
fix pipeline3
@senpl Thanks! Can you add a test around this new behavior? There is a Contributing Guide that covers how to contribute and get Cypress running locally in generally here: https://github.com/cypress-io/cypress/blob/develop/.github/CONTRIBUTING.md Here's an example of another issue's test code:
To run the tests:
Instructions for running the |
…-visible"-for-Cypress
…-visible"-for-Cypress
…-visible"-for-Cypress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually tested the change against the 3 examples this is expected to fix. It does fix them.
There are some other tests failing however, so it looks like this logic has broken some other visibility checks:
I had some concern around performance of this, and whether this would mean slower performance. Running benchmarks against offsetWidth
vs getBoundingClientRect
seem to indicate that getBoundingClientRect
is actually faster.
Before
After
…-visible"-for-Cypress
…-visible"-for-Cypress
@senpl I do see this visibility test failing in Firefox still: https://app.circleci.com/pipelines/github/cypress-io/cypress/61191/workflows/c905446a-87ae-471c-b49d-c56af8106b97/jobs/2544376 |
…-visible"-for-Cypress
On current firefox 125 it works with my version. Is there a reason to not use latest version ??? |
@senpl We just don't have the updates for Firefox automated, so it falls behind. |
Yah this does pass for me locally in Firefox 124. :/ |
This is coincidentally trying to be updated here atm: #29391 |
as #29391 (comment) is solved may I please for rerun of tests? |
…-visible"-for-Cypress
@senpl Yay, didn't realize this was merged. I'll rerun |
…-visible"-for-Cypress
…-visible"-for-Cypress
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@senpl There's a couple of weird errors in the test files that seem unrelated that I'm tracking down. Outside of that, there is a failure in our own tests due to the visibility changes that doesn't seem accurate.
You can see the failure in run-launchpad-component-tests-chrome
and run them yourself using the packages/launchpad/README.md
instructions for running component tests.
Cypress is saying something is visible when it is not with this change.
3 failed and 10 flaky tests on run #55315 ↗︎
Details:
src/components/code/FileRow.cy.tsx • 1 failed test • launchpad-ct
cypress/e2e/specs_list_e2e.cy.ts • 1 failed test • app-e2e
cypress/e2e/dom/visibility.cy.ts • 1 failed test • 5x-driver-firefox |
mocha added to launchpad package
…-visible"-for-Cypress
make it pipeline ok
pipeline
Visible elements are "not visible" for Cypress #29093
Additional details
Change was necessary because previous visibility check version works only with integer values for visibility. Current fix provide it with getting real width.
In theory it now fixes issue when visible element throws error as hidden/invisible or without width/height.
Still how visibility should behave when grid is used is not really clear, so there might be cases that this check is not perfect. Still I guess it's better than it was before.
Steps to test
e2e or component test
How has the user experience changed?
User no longer has to use {force: true} fix.
PR Tasks
cypress-documentation
?type definitions
?