Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Validation and write e2e tests covering all scenarios for the username generation flow during signup. #605

Open
6 of 10 tasks
Abhay5855 opened this issue Aug 22, 2024 · 0 comments

Comments

@Abhay5855
Copy link

Abhay5855 commented Aug 22, 2024

Issue Description

During signup flow add appropriate validations and e2e tests for automatic generation of username from First Name and Last Name fields.

Expected Behavior

When user is in the signup flow, it should not allow blank spaces to be added in the first name and last name fields, Also the username must be atleast 4 character long for reference -
First Name - Abhay
Last Name - Patil
The generated username (if no Abhay patil was there before in the DB) - Abhay-Patil,
If some other user with same First Name and Last Name the generated username - Abhay-Patil-1

Current Behavior

Currently on the signup flow there is a username field, the username gets generated automatically after entering the first name and last name field, however if a blank space is added in the first name or last name field it accepts it and create an unusual username, and there is a restriction that username must be at leaast 4 characters long due to adding space in the first name and last name field the username does not get generated as expected.

Screenshots

Error when the username is less than 4 characters long

usernameerror

Error when blank space is added in the first name and last name fields

username2

Reproducibility

  • This issue is reproducible
  • This issue is not reproducible

Steps to Reproduce

  1. Visit the /new-signup route
  2. Add your First Name, Last Name and then Submit button.
  3. The username should be generated for you with your added First Name and Last Name.

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Additional Information

Writing/Reviewing good e2e tests to ensure the username generate flow works smoothly considering all scenarios like -

  1. The first name and last name field should not be blank.
  2. No Blank spaces should be allowed to be entered in the fields.
  3. User should not be allowed to enter the username manually it should be generated automatically.
  4. If user with similar full name gets added the username should be generated accordingly first_name-last_name, first_name-last_name-1, first_name-last_name-2 ...

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant