qunit-dom
qunit-dom copied to clipboard
isNotVisible fails when element is hidden using visibility:hidden style
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.
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. https://github.com/simplabs/qunit-dom/issues/418#issuecomment-523142483