oss-slu / Enhancing-Bioinformatics-Research-through-LLM

Apache License 2.0
0 stars 0 forks source link

added login screen with basic unit testing for valid email and passwo… #9

Closed PranaviKolouju closed 2 months ago

PranaviKolouju commented 2 months ago

Fixes #6

What was changed?

A login page was added with a title describing the purpose of the page ("Login Screen"), two text fields for the user to input their email and password, and a submit button to submit their information. Unit testing was added to validate the users email, password, and the submit button.

Why was it changed?

The web application requires a login screen that allows users to create an account or login to an existing account. This code works toward that by introducing a basic page that allows users to input a username and a password, and with some preliminary checks to validate that the user's information meets standard authentication requirements.

How was it changed?

The App.js file was modified to add routing to the login screen using React-router. The LoginScreen.js file was added to hold all of the information in regards to the page layout of the login page and its components. The Material-UI component library was used to build this page and add its various components (Typography, Text Fields, and Button). The LoginScreen.test.js file was added to contain all the unit tests for the LoginScreen. The unit tests include 3 unit tests that test the validity of the email, 3 unit tests that test the validity of the password, and 3 unit tests that test the functionality of the submit button.

Screenshots that show the changes (if applicable):

Login Screen UI: image

Navigation to Login Screen: image

Email and Password Validation:

Screenshot 2024-09-16 at 6 44 12 AM

Example Test Cases:

Screenshot 2024-09-16 at 6 44 39 AM