cquinn417 / Greenway

0 stars 0 forks source link

US2 User Login #27

Open sofiamancini opened 6 days ago

sofiamancini commented 6 days ago

User Story: User Login AS A user, I WANT TO log in using my email and password authentication, TO access and manage my sustainability goals and carbon footprint data, SO THAT I can seamlessly track my progress across multiple devices.

SCENARIO: Successful Login GIVEN the user is on the login screen of the Greenway app, WHEN the user enters a valid email address and correct password, AND clicks the "Login" button, THEN the system should authenticate the user using Firebase authentication, WITHIN 3 seconds, AND the user should be redirected to the main dashboard screen WITHIN 2 seconds.

SCENARIO: Invalid Login Credentials GIVEN the user is on the login screen of the Greenway app, WHEN the user enters an email or password that does not match an existing account, AND clicks the "Login" button, THEN the system should display an error message stating "Invalid email or password" WITHIN 1 second, AND prompt the user to re-enter their login information or reset their password.

SCENARIO: Forgot Password Request GIVEN the user is on the login screen and has forgotten their password, WHEN the user clicks the "Forgot Password" link, THEN the system should prompt the user to enter their registered email address, AND display a message confirming that a password reset link has been sent to their email WITHIN 30 seconds.

SCENARIO: Email Not Registered GIVEN the user is on the login screen of the Greenway app, WHEN the user enters an email address that is not registered in the system, AND clicks the "Login" button, THEN the system should display an error message stating "No account found with this email" WITHIN 1 second, AND prompt the user to sign up or try a different email.

SCENARIO: Network Error During Login GIVEN the user is on the login screen of the Greenway app, WHEN the user enters a valid email and password, AND clicks the "Login" button, THEN if a network error occurs, the system should display an error message stating "Network error. Please try again later." WITHIN 2 seconds, AND allow the user to retry the login process once the network is stable.

SCENARIO: Account Locked After Multiple Failed Attempts GIVEN the user has attempted to log in multiple times with incorrect credentials, WHEN the system detects 5 consecutive failed login attempts, THEN the system should temporarily lock the account for 10 minutes AND display a message stating "Your account is temporarily locked due to multiple failed attempts. Please try again later or reset your password." WITHIN 1 second.