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

[Frontend] Login functionality improvements and unit tests #367

Closed
berkaydoner opened this issue Jan 4, 2022 · 3 comments
Closed

[Frontend] Login functionality improvements and unit tests #367

berkaydoner opened this issue Jan 4, 2022 · 3 comments

Comments

@berkaydoner
Copy link
Collaborator

I had not implemented a input validation method over the email and password fields in the forgot password page before. I am going to add them with two helper methods to check email and password formats. I am also planning to try various strings and check if they are in email/password format in the unit tests.

@berkaydoner
Copy link
Collaborator Author

I have added two methods to check the email and password format.
Email format check method checks if there is a segment separation in the text specified by @ and if there are one or two segment separations after @, specified by dot. Texts with "...@domain.dom" and "...@domain.dom.do" format are accepted as emails.
Password format check method checks if the given string contains lowercase, uppercase characters and digits and has a length of at least 8.

@berkaydoner
Copy link
Collaborator Author

I have added unit tests with various possible email and password texts and check if they are correctly identified or not. My unit tests pass on my local system and in the GitHub Actions. Pull request is #304.

@berkaydoner
Copy link
Collaborator Author

Pull request is merged and closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant