Then the form should show an error

Assert the HubSpot form does (or does not) show an error message, optionally containing the given text: a field error or the message for the whole form ("Please complete all required fields."). Submit the form first.

Examples

Then the form should show an error
And the form should show an error containing "required"
Then the form should show an error containing "Please complete all required fields."
But the form should not show an error
Then form should not show an error containing "required"

Pattern

Then(/^(?:the )?form should( not)* show an error(?: containing "([^"]*)")?$/, …)

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