phoenix_integration icon indicating copy to clipboard operation
phoenix_integration copied to clipboard

Add visible_html to assertions

Open idabmat opened this issue 3 years ago • 0 comments

Thanks @boydm for this library.

I'm aware this has been stable for a while. Just wondering if a change in this direction would be welcome. When asserting against html, dumping the raw body of the response can make it tricky to spot where and why the failure occurred. Also, I'd like to avoid tests to pass if a match was found on some html attribute for example.

The idea would be to provide a way to assert only against the "visible" part of html, using Floki.text/1.

This is a rough spike of the idea. If there is interest in such a change, I'd be happy to polish it as needed and update the docs accordingly.

idabmat avatar Jul 14 '22 11:07 idabmat