Then I should see the success message "Post created successfully!"

Assert a message the page shows after an action: a flash message the app set before the redirect, or an alert of the page. With a kind, the message must be of that kind (success, error, warning, info), read from its class (alert-success, alert-danger, alert-warning, alert-info).

Examples

Then I should see the success message "Post created successfully!"
Then I should see the error message "Invalid credentials."
And I should see the message "Post deleted successfully!"
Then I should not see the success message "Post created successfully!"
Then we should see the info message "After changing your password, you will be logged out of the application."

Pattern

Then(/^(I |we )*should( not)* see the (?:(success|error|warning|info) )?message "([^"]*)"$/, …)

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