-
Notifications
You must be signed in to change notification settings - Fork 52
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
add tests for getAllBlueSquareEmailAssignments action creator #3278
base: development
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ 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.
Hey, great job on the tests! The structure is clear, and the use of mocked API calls ensures both success and failure cases are covered well. I like how the actions are properly asserted in the store. One small suggestion—consider refining error handling to check for specific error response structures instead of just passing the error object. Overall, this looks solid and well-implemented!
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.
I checked all the code changes and followed the steps as mentioned. I checked into the current branch, ran npm install to install the necessary dependencies, and then ran npm test blueSquareEmailBCCAction.js.test.js. There were no issues with the test, so everything works as expected. I’m approving the PR.
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.
I have tested this PR and all test cases passed successfully!!!
Description
This PR includes the implementation and testing of the getAllBlueSquareEmailAssignements function in the blueSquareEmailBCCAction.js file. The function is responsible for fetching all blue square email assignments by making an HTTP GET request to the specified endpoint and dispatching the appropriate actions based on the response.
Main changes explained:
Implemented the getAllBlueSquareEmailAssignements function to handle fetching all blue square email assignments.
Added unit tests for the getAllBlueSquareEmailAssignements function to ensure it dispatches the correct actions and handles asynchronous operations correctly.
How to test:
Check into the current branch.
Run npm install to install the necessary dependencies.
Run npm test blueSquareEmailBCCAction.js.test.js
Screenshots or videos of changes: