qunit-dom icon indicating copy to clipboard operation
qunit-dom copied to clipboard

isNotVisible fails when element is hidden using visibility:hidden style

Open BillyRayPreachersSon opened this issue 5 years ago • 1 comments

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.

BillyRayPreachersSon avatar Apr 08 '19 10:04 BillyRayPreachersSon

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

steveszc avatar Aug 20 '19 18:08 steveszc