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: 28187 Include checkVisibility browser API as a reliable tool to check visibility #29741

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

Conversation

senpl
Copy link

@senpl senpl commented Jun 25, 2024

Visibility check in browser is close to one used in cypress. Still some test has to be changed to make it compatible with what is really seen in browser.
If backward compatibility is required then some option could be applied to make elements previously invisible still detected as invisible. Still default should be compatible with browser implementation.

Additional details

It should close many other visibility issues,

Steps to test

//this now should work
cy.get('details')
.children('div')
.should('not.be.visible')

How has the user experience changed?

Users should now use is hidden not is visible. Because some element might be visible still not really clicable or interactable.
In old version that two was connected. But hidden is not the same as visible. So this change make it compatible with other frameworks implementation.

PR Tasks

@cypress-app-bot
Copy link
Collaborator

@senpl senpl changed the title fix 28187 Include checkVisibility browser API as a reliable tool to check visibility fix: 28187 Include checkVisibility browser API as a reliable tool to check visibility Jun 25, 2024
@senpl senpl marked this pull request as ready for review June 25, 2024 10:35
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

@senpl There are some failures in the assertions spec in CI for this change.

@senpl
Copy link
Author

senpl commented Jun 27, 2024

This related to visibility fixed.

@jennifer-shehane
Copy link
Member

@senpl All of the tests will need to be passing in order for us to merge, with no breaking changes to users.

@senpl
Copy link
Author

senpl commented Jul 1, 2024

, with no breaking changes to users.

If visibility should work exactly like in older version this could be done. Still this could be done as option or parameter if really needed. To decide what should be default for new version. Coz right now visible element are marked as not visible and it probably should be warning not error. Because someone might not need interaction, only check if something is visible.

@jennifer-shehane
Copy link
Member

@senpl The tests are failing in webkit for the visibility spec

@senpl
Copy link
Author

senpl commented Jul 2, 2024

The tests are failing in webkit for the visibility spec

This test failing in my build with old visibility implementation so I turn them off for webkit as their seems just not compatible with current webkit. To make it work in new version I would need version that works in old version without trackback to very old builds. Also in newer version of webkit their work as well. Just version in build seems not working.

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.

None yet

3 participants