-
Notifications
You must be signed in to change notification settings - Fork 374
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
[yesod-test
] bring back support for matching of preescaped strings
#1784
Comments
eahlberg
changed the title
[yesod-test] bring back support for matching of preescaped strings
[Oct 7, 2022
yesod-test
] bring back support for matching of preescaped strings
I think it's a very valid use case to check if some raw HTML is contained verbatim. So I would appreciate an additional API like |
A pull request with that function sounds sensible. Let's do it. |
In case it's useful, until that function exists, this stopgap should work: htmlQuery "meta[name=description]" >>= \(bs:_) ->
liftIO $ bs `shouldSatisfy` ("This is the site description" `isInfixOf`) |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I upgraded
yesod-test
to version 1.6.15 I noticed some tests started to fail, e.g.:Fails with:
AFAIU this is because
htmlAnyContain
was changed to support matching e.g. quotes ('
) by escaping input by default.I guess it's not possible to support both of these cases with the same API? To work around this locally I have the old version of
htmlAnyContain
around which does not escape input. If that's sounds like a sensible solution, I could open a PR which brings back that version under a new name (e.g.htmlAnyContainPreEscaped
) to avoid other people (and my future self) running into this issue.The text was updated successfully, but these errors were encountered: