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

isNotVisible fails when element is hidden using visibility:hidden style #335

Open
BillyRayPreachersSon opened this issue Apr 8, 2019 · 1 comment
Labels

Comments

@BillyRayPreachersSon
Copy link

BillyRayPreachersSon commented Apr 8, 2019

Presently, assert.dom(el).isNotVisible() will fail if the element in question has been hidden using the visibility: hidden style.

Is this intentional?

If not, and it's just an oversight, how do people feel about me raising a PR to update the isNotVisible method to take this style into account (possibly with a flag in a new options parameter, to avoid breaking existing functionality)?

I might also include a .doesNotHaveStyle assertion in the same PR, as right now I can test whether the style has been applied with .hasStyle({ visibility: 'hidden' }, but not for the opposite case.

@steveszc
Copy link

Related to #418
I did a little digging and found out why this is the case. TLDR isVisible and isNotVisible are based on jquery's :visible pseudo selector.
#418 (comment)

@Turbo87 Turbo87 added the bug label Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants