Then the form success message should contain "Thank you"

Assert the text of the form's success or error message, so a scenario proves the visitor reads the right words, not only that a box appeared.

Examples

Then the form success message should contain "Thank you"
Then the form error message should contain "Something went wrong"
And the webflow form success message should contain "received"
Then the form error message should not contain "Thank you"
And the webflow form success message should not contain "Oops"

Pattern

Then(/^the (?:webflow )?form (success|error) message should( not)* contain "([^"]*)"$/, …)

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