Send the admin login form with a user name and a password. The step does not expect the login to succeed: assert the outcome with the next step. A new password (after a password change) logs in this way too.
Examples
When I log in with the user name "nobody" and the password "Wrong-password-1"
When we log in with the user name "viewer" and the password "Not-the-password-2"
And I log in with the user name "editor" and the password "Changed-pass-2026!"
When I log in with the user name "" and the password "Wrong-password-1"
When we log in with the user name "Someone unknown" and the password "x"
Pattern
When(/^(I |we )*log in with the user name "([^"]*)" and the password "([^"]*)"$/, …)
Part of @webship-js/django-steps (github.com/webship/django-steps), a step pack for Webship-js 2.0.x.