-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Opacity is not considered for visibility checks #4474
Comments
Nice. Thanks for opening this issue. Was going to do this myself. I am currently working on visibility fixes - one of which was implementing this change for opacity. We had initially decided not to consider elements with opacity 0 as 'not visible', because they are still interact-able, but we're going to be pulling this all out into a broader issue so that there can be different checks for 'can be seen', 'can be seen in viewpor', and 'can be interacted with' Read more here: #1242 Some of our previous reasoning: #677 I actually have already written the code for the opacity check (commented out in this PR #4421) - as this would be implemented as part of the 'can be seen' code, but I think due to the change, this would have to go into a major code version update as it would be breaking our users current expectations. Workaround TodayMake sure that cy.get('div').should('have.css', 'opacity', '0') |
I have actually worked on a piece of code that also set the |
@jennifer-shehane I think that the fact that
What do you think? |
The code for this is done in cypress-io/cypress#8244, but has yet to be released. |
This fix requires a breaking change, so is targeted for our next breaking change release. You can follow along with progress on this release here: #8437 |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
Desired behavior:
When opacity === 0, the element should be considered as not visible to avoid evaluating the next command sooner than expected and causing flakiness.
Steps to reproduce: (app code and test code)
I think the issue is pretty clear from the image, but I can provide reproduction later if you consider it necessary.
Versions
[email protected]
Electron 61
Windows 10 x64
The text was updated successfully, but these errors were encountered: