nathanboktae / chai-dom

DOM assertions for the Chai assertion library using vanilla JavaScript
Other
76 stars 26 forks source link

Feature: Add 'visible' assertion for testing visibility !== hidden or collapse #29

Closed smhxx closed 6 years ago

smhxx commented 6 years ago

Hello!

This PR proposes/adds a new assertion to complement the .displayed assertion, which tests for the CSS property visibility being unequal to hidden or collapse.

I'm not really sure what to say about it other than that. 😂 I've been using chai-dom in a project of mine, and I was just surprised to see that there was no analog of .displayed to test whether elements were hidden using the visibility property. It's a pretty straightforward thing to add, since it follows pretty much the same "format" as .displayed, as far as code is concerned, so I figured I'd add it real quick and submit a PR.

Cheers!