Assert an error of the whole form, the one no field owns (a form sent with a token that is no longer valid, a rule on the whole object): the form theme prints it at the top of the form.
Examples
Then the form should have the error "The CSRF token is invalid. Please try to resubmit the form."
Then the form should have the error "This form should not contain extra fields."
And the form should have the error "The uploaded file was too large. Please try to upload a smaller file."
Then the form should have the error "The CSRF token is invalid. Please try to resubmit the form."
Then the form should have the error "This form should not contain extra fields."
Pattern
Then(/^the form should have the error "([^"]*)"$/, …)
Part of @webship-js/symfony-steps (github.com/webship/symfony-steps), a step pack for Webship-js 2.0.x.