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

Add visible_html to assertions #63

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

idabmat
Copy link

@idabmat idabmat commented Jul 14, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant