Then the login should be refused with "Invalid username or password."

The login form is on screen again with the server's refusal: the message under the field or over the form ("Invalid username or password.", "Account is disabled, contact your administrator.").

            And I should not be logged in

Examples

Then the login should be refused with "Invalid username or password."
Then the login should be refused with "Invalid username or password"
Then the login should be refused with "Invalid username or password."
Then the login should be refused with "username or password"
Then the login should be refused with "Account is disabled, contact your administrator."

Pattern

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

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