[Bug]: Login issue where the password field does not initially accept the 8 characters
gbowne1 opened this issue · 9 comments
Describe the Bug
This may or may not be a thing, but I am getting a minor bug where I am entering the test user's credentials.
Initially when I enter the password, it doesn't like to accept the password and I get the red border and it says Password must be 8 characters, and in this case the test users' password is totally 10 characters long.
This happens Especially if I use the test user's saved creds from the browser.
This also is sometimes intermittent. It works totally if I have been to the page before.
I have to go click on Login for it to actually recognize the 10 character password as the right length.
once the user gets to the 8th ~ 9th character in their entry the field the red border and warning should dissapear as well as not immediately appear when using a saved item.
As you can see in the screen shot, there is totally 10 characters and the border/warning still appears.
Steps to Reproduce
Start the development server by
cd to /client
run npm start
and in another terminal
cd to /server
wait for the dev server to start.
Get to the login screen and try entering the test users' creds. you should see the screenshot below.
Screenshots
Which device are you using?
Linux VM Server
Which operating system are you using?
Linux x64, Debian Base
Which browser are you using?
Firefox 112
Additional Context
No response
Contribute
- I am willing to contribute and submit a pull request
Will investigate this.
@gbowne1 Is this currently happening? I'm having difficulty trying to reproduce the issue :/
Just to explain how the current functionality is now, after using now front-end and back-end:
- localStorage is not used anymore for storing testuser credentials, these are stored in the backend db by default when the db is created, hence why these credentials are always available.
- The validation is only run when the submit button(login/register) is pressed, so right now functionality is not that the red warning label around inputs will automatically disappear if say, you have 7 characters in password input and then you add an 8th, in this case red label will remain. Instead once you click login/register the red label will disappear, as a new validation will be ran. This is to prevent all inputs being red from the beginning, because if we run validation when page is loaded and all inputs are empty then all inputs will be red.
In any case I will keep trying to reproduce the issue and fix it if I get it, if there's anything more I can do to reproduce please write me here in a comment :)
it only happens sometimes. I have the test creds saved in my browser. When applied it automatically turns the field red like shown. If I go back through, like refresh, log out, then try logging in again, this does not happen. It's intermittent.
I will add an automated test that checks this, this way anytime anyone runs the e2e tests this will be checked, adn we will catch it if happens again.
Good idea. Just curious that a ten character autocompleted password would turn it red and display the error.
I still have not been able to nail down whats causing this either.