Then the "Email address" field should have the error "These credentials do not match our records."

Assert the error the app shows under a field, or that it shows none. The field is found by its label (or name); the error is the message the app prints in the field's own group or names with aria-describedby. The step waits for the message, so it holds right after the press that sent the form.

Examples

Then the "Email address" field should have the error "These credentials do not match our records."
Then the "Password" field should have the error "The password field confirmation does not match."
And the "Current password" field should have the error "The password is incorrect."
Then the "Email address" field should not have the error "The email has already been taken."
Then the "email" field should have the error "The email has already been taken."

Pattern

Then(/^the "([^"]*)" field should( not)* have the error "([^"]*)"$/, …)

Part of @webship-js/laravel-steps (github.com/webship/laravel-steps), a step pack for Webship-js 2.0.x.