You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Added integeration test for LoginView page - #4325
@khushpatel173 thanks for this!
Not sure if this qualifies as an integration test since it mocks in the test setup instead of creating a state.
It would still be useful but I think this is more of a unit test
@khushpatel173 thanks for this! Not sure if this qualifies as an integration test since it mocks in the test setup instead of creating a state. It would still be useful but I think this is more of a unit test
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
@khushpatel173 thanks for this! Not sure if this qualifies as an integration test since it mocks in the test setup instead of creating a state. It would still be useful but I think this is more of a unit test
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
I would say just renaming is sufficient. I believe the behaviour you're describing is covered in the e2e tests @Geethegreat could you confirm?
@khushpatel173 thanks for this! Not sure if this qualifies as an integration test since it mocks in the test setup instead of creating a state. It would still be useful but I think this is more of a unit test
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
I would say just renaming is sufficient. I believe the behaviour you're describing is covered in the e2e tests @Geethegreat could you confirm?
Renamed it. Does it need any other changes?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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