Assert a message the page shows, by its kind: an error ("Unable to log you in. Please check your password."), a success ("You have successfully logged out."), a warning or an information. The message is a line of a message box of the page (role="alert" or role="status", marked by its kind: an alert-danger box is an error, alert-success a success); a box that lists several errors (a refused form) holds one per line. The step waits for the message, so it holds right after the press that sent the form.
Examples
Then I should see the error message "Unable to log you in. Please check your password."
Then I should see the success message "You have successfully logged out."
And I should see the error message "The Email Address field must contain a unique value."
Then we should not see the error message "Unable to log you in. Please check your credentials."
Then I should see the warning message "Your session will end in five minutes."
Pattern
Then(/^(I |we )*should( not)* see the (error|success|warning|info) message "([^"]*)"$/, …)
Part of @webship-js/codeigniter-steps (github.com/webship/codeigniter-steps), a step pack for Webship-js 2.0.x.