yesodweb/yesod — pull request #509 by ShaneKilkelly (2013-03-03 17:41:29+00:00)
Title: Test additions

The new function htmlAnyContain is a variation on the existing htmlAllContain, but passes if any of the matched elements contain the search string.

For example, it could be used to verify that there is an "Edit Profile" link on the page somewhere:

``` haskell
htmlAnyContain "a" "Edit Profile"
```

There is some overlap with the htmlCount function, however htmlAnyContain could be used when we want to assert that some quantity of an element exist on a page, but the number of them is not known, or we are not really concerned about the number as long as it is non-zero:

``` haskell
htmlAnyContain "a" "Like this Post"
```