StrikekitStrikekit

Waits and asserts examples

wait forms and should assertions as complete .stk files

Poll until UI is ready, then assert text, URL, state, counts, and downloads.

Wait for element, text, and URL

Platform: web

Group: Waits

    Scenario: Dashboard after save
        Given I navigate to "$BASE_URL/settings"
        When I click on "Save"
        And I wait for see "Saved successfully"
        And I wait until not see "Saving..."
        And I wait until be on "/dashboard"
        And I wait for "dashboard"
        Then I should see "Dashboard"
        And I should be on "/dashboard"

should — text, state, and value

Platform: web

Group: Asserts

    Scenario: Field state after fill
        Given I navigate to "$BASE_URL/login"
        When I fill "username" with "chamodh"
        Then I should see "Login"
        And I should not see "Error"
        And I should see containing "Welcome"
        And I should have "username" value "chamodh" be enabled
        And I should have "locked-field" be disabled
        And I should have "terms" be checked
        And I should have "spinner" not be visible

Counts, attributes, and numeric compare

Platform: web

Group: Asserts

    Scenario: Catalog counts and totals
        Given I navigate to "$BASE_URL/products"
        Then I should have "products" count be greater than "0"
        And I should have "products" count "3"
        And I should have "home-link" attribute "href" value "/home"
        And I should have "cart-total" be greater than "100"
        And I should have "email" value "a@b.com" have "confirm" value "a@b.com" be equal

Network idle and indeterminate

Platform: web

Group: Asserts

    Scenario: Idle then tri-state
        Given I navigate to "$BASE_URL/dashboard"
        And I wait for network idle
        Then I should have "select-all" be indeterminate

Download basename

Platform: web

Group: Asserts

    Scenario: Export CSV download
        Given I navigate to "$BASE_URL/reports"
        When I click on "Export CSV"
        Then I should have downloaded "report.csv"

On this page