MDL-44891 Behat: Add step to check attribute
commit15c8c474012638742fe9ad0aa6140a1c110a59c5
authorsam marshall <s.marshall@open.ac.uk>
Thu, 27 Mar 2014 18:44:29 +0000 (27 18:44 +0000)
committersam marshall <s.marshall@open.ac.uk>
Fri, 4 Apr 2014 17:17:39 +0000 (4 18:17 +0100)
treecb68f30db5793ff962a7f011f56df3a1ed6a0b1e
parent1a727e121ef94ae80dd2a8a13f49049d3bc25ef3
MDL-44891 Behat: Add step to check attribute

This commit creates a Behat step of the form:

Then the "title" attribute of "Toggle visibility" "button"
should contain "Show"

This is useful because unless I missed something there is currently
no step that checks attribute values; this seems like a simple
generic step. Behat is intended to check user-visible effects in
the resulting HTML, and sometimes these effects are implemented
using attribute values (two common examples are the alt= attribute,
which is visible to screenreader users, and the title= attribute,
which is visible to all users; there's also the src attribute of
images, and lots of other possibilities too).
lib/tests/behat/behat_general.php