Admin: Trying to log in with incorrect information fails without an error
Description
1. Go to https://test.archiveofourown.org/admin/login
2. Enter your admin user name and the wrong password, or enter both wrong
3. Press "Log in as admin"
What happens
The log in page just reloads and, if your connection is fast, you're left going, "Wait, did it even do anything?"
What should happen instead
You should get a red error message telling me, "The password or admin user name you entered doesn't match our records."
Activity
Tried logging in as an admin with an existing username but incorrect password. Same error message Claire reported above. Then tried with a nonexistent admin username; same message.
Tried logging in as an admin with existing username but incorrect password.
Red error message shows above login (and below the headers) stating “The password or admin user name you entered doesn't match our records.”
Pull Request
Purpose
Updates the error message you try to log in with an existing admin name with the wrong password.
Tests aforementioned scenario.
Tidies the tests in the relevant feature file:
Consistent indenting and spacing.
Updated scenario descriptions.
Use the label text for the field names.
Testing Instructions
Try to log in as an admin using an existing admin username, but an incorrect password.
Tried to log in with a nonexistent username and a random keysmash of letters. Got the red flash error:
The password or admin user name you entered doesn't match our records.
Tried again with my actual admin name and an invalid password, but got a different message:
Invalid Login or password.
That doesn’t seem quite right.
It’s the same message I get on production, though, so I don’t think this is necessarily deploy blocking. If we can’t fix it in the next day or so, we can always make a new issue for the error message in that scenario.
Attempted to login via the admin login page with incorrect credentials. Got a red flash error message:
The password or admin user name you entered doesn't match our records.
ETA: Tested Sarken’s scenario and got the error message she described “Invalid Login or password”.