Assert the HubSpot form's success ("thank you") message is (or is not) visible, optionally containing the given text. A form set to redirect leaves the page instead; assert the new address with "I should be on ...".
Examples
Then the form should show a success message
Then the form should show a success message containing "Thanks"
And the form should show a success message containing "received your message"
But the form should not show a success message
Then the form should not show a success message containing "error"
Pattern
Then(/^(?:the )?form should( not)* show a success message(?: containing "([^"]*)")?$/, …)
Part of @webship-js/hubspot-cms-steps (github.com/webship/hubspot-cms-steps), a step pack for Webship-js 2.0.x.