Added integeration test for LoginView page - #4325
khushpatel173 wants to merge 1 commit into
Conversation
|
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
|
@lindapaiste Please review this , also if it looks good then i can write tests for other User pages as well |
|
@khushpatel173 thanks for this! |
Yes , you are correct this is a unit test , should i try to change it to a integeration test like what i can check is by sending a real network request in the login with some data i can check weather its actually changing the store as user authenticated true or not and then check weather the user was redirected or not , and can also check by sending invalid credentials and can check that it doesnt change the state in store , does this way sounds correct?? or should i just keep it as it as and rename it to a unit test |
Issue:
Ref #2923
Added Integration test for LoginView.tsx page
Changes:
Adds an integration test file
client/modules/User/pages/LoginView.integration.test.jsxcovering:LoginForminputs (username/email, password, submit button)/signupand/reset-passwordvalidateAndLoginUseraction is invoked with the entered credentialsDemo:
It fails if i change something lets say if i change the redirect link to something else rather than /signup
I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123