Assertions

Steps for verifying text content, element visibility, element count, and values. Assertion failures cause the step to fail immediately.

assertText

Assert that the text is present (within the element when selector is given).

Parameters

FieldTypeRequiredDescription
textstringYesExpected text
selectorstringNoScope selector

Example

- assertText:
    text: 'Saved'
    selector: '#status'

assertVisible

Assert that the element is visible.

Parameters

FieldTypeRequiredDescription
selectorstringYesElement selector

Example

- assertVisible:
    selector: '#main-form'

assertNotVisible

Assert that the element is not visible.

Parameters

FieldTypeRequiredDescription
selectorstringYesElement selector

Example

- assertNotVisible:
    selector: '#error-banner'

assertCount

Assert that the number of elements matching the selector equals the expected count.

Parameters

FieldTypeRequiredDescription
selectorstringYesSelector to count
countnumberYesExpected count

Example

- assertCount:
    selector: ':has-press'
    count: 5

assertValue

Assert that the element's value prop matches the expected string.

Parameters

FieldTypeRequiredDescription
selectorstringYesElement selector
expectedstringYesExpected value

Example

- assertValue:
    selector: '#quantity-input'
    expected: '3'