Then the login should be refused with "Invalid login attempt."

Assert that the login was refused: the browser is back on the login page (or on the page of the code of an authenticator app), which says why. The default account pages say "Invalid login attempt." for a wrong password, an unknown account and an account whose email is not confirmed alike, and "Invalid authenticator code." for a wrong code.

Examples

Then the login should be refused with "Invalid login attempt."
Then the login should be refused with "Invalid authenticator code."
And the login should be refused with "Invalid login attempt."
Then the login should be refused with "Invalid login attempt"
But the login should be refused with "Invalid login attempt."

Pattern

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

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