-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix-#6: integration test completed for signin component #413
fix-#6: integration test completed for signin component #413
Conversation
…t , fixed unit test due to new changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @Aswin2255! Thanks for sticking to the guidelines! High five! 🙌🏻 |
1 similar comment
Hey @Aswin2255! Thanks for sticking to the guidelines! High five! 🙌🏻 |
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.
Thank you Ashwin, But please prepare tests for many other scenarios, ideally tests should contain all the scenarios it might go to crazy number,
Can you kindly enhance this to have decent amount of test cases which covers all the scenarios?
@@ -13,7 +13,7 @@ const app = express(); | |||
app.use( | |||
cors({ | |||
// added origin | |||
origin: FRONTEND_URL, | |||
origin: [FRONTEND_URL, 'http://localhost:3000'], | |||
credentials: true, |
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.
What is this change?
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.
since we are doing an integration test with the real API. The jsdom is our frontend and it's default URL is localhost:3000, so if we doesn't include it we will get an cors error during integration test..
@@ -2,7 +2,7 @@ | |||
import { http, HttpResponse } from 'msw'; | |||
|
|||
export const handlers = [ | |||
http.post('http://localhost:5000/api/auth/email-password/signup', () => { | |||
http.post('http://localhost:8080/api/auth/email-password/signup', () => { | |||
return new HttpResponse(null, { |
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.
No hard coding please
import { toast } from 'react-toastify'; | ||
|
||
interface sucessdata { | ||
status: number; |
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.
I see this used multiple places, can we have a seperate types folder? and make it reusable
The integration test completed for the sign-in component fixed the unit case failure due to the new changes introduced
Summary
An integration test is performed on the sign-in component using the real backend API
Description
To perform the integration test we need to run the backend, also we need to have a test user in the database with the test credentials
Images
Issue(s) Address
#6
Prerequisites