-
Notifications
You must be signed in to change notification settings - Fork 44
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
Aditya-Added-Testing-for-Login #2734
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Aditya, great job on the initial tests for the Login page! Your tests are well-organized and cover important features like the page layout, input handling, and login actions. Using both shallow
and mount
rendering helps get more accurate results by simulating the component behavior properly. The focus on error handling and updating the state, especially for form validation and submission, is excellent and makes your tests more reliable. Overall, these tests are a strong start for ensuring the Login page works correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR 2734
@adityasure9
Tested the test file and all the test cases passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @adityasure9
Everything is working as mentioned.
Thank you.
Thank you all, merging! |
Description
This PR introduces unit tests for the
Login
component, focusing on testing the structure of the login page, handling user input, and ensuring correct login behavior. These tests cover input field changes, form validation, and the submission process to ensure that theLogin
component functions as expected.Main changes explained:
Login.test.jsx
to introduce unit tests for theLogin
component.loginUser
) is called with the right credentials.How to test:
npm install
to install dependencies.npm test Login.test.jsx
to execute the unit tests.Screenshots or videos of changes: