Then the registration should be refused with "The username you entered is already in use, please select an alternative."

Assert that the registration form was refused with an error (or a part of it), shown above its fields.

Examples

Then the registration should be refused with "The username you entered is already in use, please select an alternative."
Then the registration should be refused with "The entered email address is already in use."
And the registration should be refused with "The passwords you entered do not match."
Then the registration should be refused with "The email address you entered is invalid."
Then the registration should be refused with "already in use"

Pattern

Then(/^the registration should be refused with "([^"]*)"$/, …)

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