Assert the error a field of the form shows after a save that did not pass validation, by the label of the field.
Examples
Then the "Summary" field should have the error "cannot be blank"
Then the "Title" field should have the error "cannot be blank"
Then the "Summary" field should have the error "should contain at most 160 characters"
And the "Slug" field should have the error "cannot be blank"
Then the "Email" field should have the error "is not a valid email address"
Pattern
Then(/^the "([^"]*)" field should have the error "([^"]*)"$/, …)
Part of @webship-js/craft-cms-steps (github.com/webship/craft-cms-steps), a step pack for Webship-js 2.0.x.