Added two new commands:
shouldHaveFocus()
- Assert that an element has focus in the document.shouldNotHaveFocus()
- Assert that an element does not have focus in the document.
Added two new commands:
fillFormField(selector, value)
- Fill a text-based form field withdata-test
attributeselector
withvalue
.shouldHaveValue(value)
- Assert that a previous form field hasvalue
.
Added three new commands:
shouldNotHaveClass(className)
- Assert that an element does not have the givenclassName
.shouldNotHaveAttribute(attribute, value)
- Assert that an element does not have anattribute
with a givenvalue
.shouldNotHaveText(text)
- Assert that the element does not contain the giventext
(including partial matches).
Added one new command:
shouldHaveClass(className)
- Assert that an element has the givenclassName
.
shouldHaveAttribute
can now accept only an attribute, in which case the existence of that attribute is checked.getFormField(selector)
can now be used without a previous element, in which case a provided selector will be used to first select the element, then find a form field within it.
Fixed an incorrect command name that would stop getFormField
from working.
Added two new commands:
shouldNotBeVisible()
- Assert that an element is not visible.getFormField()
- Get the underlying form field (input
,select
,textarea
) for a previous subject.
Added five initial commands:
getByData(selector)
- Retrieve an element by itsdata-test
attribute.shouldBeVisible()
- Assert that an element is visible.shouldHaveAttribute(attribute, value)
- Assert that an element has anattribute
with a givenvalue
.shouldHaveCount(count)
- Assert that there arecount
elements.shouldHaveText(text)
- Assert that the element contains the giventext
(including partial matches).