Assert how many errors the error summary of the form counts ("Found 3 errors"), after a save that did not pass validation.
Examples
Then the error summary of the edit form should count 3 errors
Then the error summary of the edit form should count 1 error
Then the error summary of the edit form should count 2 errors
And the error summary of the edit form should count 1 error
And the error summary of the edit form should count 4 errors
Pattern
Then(/^the error summary of the edit form should count (\d+) errors?$/, …)
Part of @webship-js/craft-cms-steps (github.com/webship/craft-cms-steps), a step pack for Webship-js 2.0.x.