Skip to content
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

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

jindaxz
Copy link
Contributor

@jindaxz jindaxz commented Mar 15, 2025

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:

image

Copy link

netlify bot commented Mar 15, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit cf0ad06
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/67d519475a82d900086a79cc
😎 Deploy Preview https://deploy-preview-3278--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 15, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 35f75df
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/67d51958b2fa770008f84000
😎 Deploy Preview https://deploy-preview-3278--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Akhilguntur2801
Copy link

I have tested this PR, and all the test cases for this file have passed successfully.
image

@cgomezhub
Copy link
Contributor

testing this functionality was ultimately not feasible at this time.
Screenshot 2025-03-15 115958

@vikasreddynomula vikasreddynomula self-requested a review March 15, 2025 16:35
Copy link

@vikasreddynomula vikasreddynomula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Works as expected and the code looks clean approving this changes

Copy link
Contributor

@Nahiyan-16 Nahiyan-16 left a 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!

Screenshot 2025-03-15 154418

@03kshitij
Copy link

Screenshot 2025-03-15 at 7 25 38 PM

All test cases passed.

Copy link

@nikhilrouth nikhilrouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the test cases for getAllBlueSquareEmailAssignements and setBlueSquareEmailAssignement action creators. The tests are structured well. I ran the tests, and they are working as expected, passing successfully. No issues found

Results
Screenshot 2025-03-15 at 9 59 59 PM

Copy link
Contributor

@abdel-lall abdel-lall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Screenshot 2025-03-16 005906

@rnavyaprabha rnavyaprabha self-requested a review March 16, 2025 06:33
Copy link

@rnavyaprabha rnavyaprabha left a 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.
image

@sampantangi sampantangi self-requested a review March 17, 2025 00:12
Copy link

@sampantangi sampantangi left a 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 the test cases for this file have passed successfully.

image

Copy link
Contributor

@vasavi-139 vasavi-139 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tests passed when I ran the script, and everything worked as expected. Attached is the screenshot from my local system for reference.
Screenshot 2025-03-17 210051

@beblicarl beblicarl self-requested a review March 21, 2025 10:49
@beblicarl
Copy link
Contributor

All tests passed successfully and the code is great

image

Copy link

@nikhilpittala16 nikhilpittala16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested the PR and all the test cases have passed.
image

Copy link

@linkhanthtel linkhanthtel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All test cases passed as expected! Nice work!
#3278

@pdp5 pdp5 self-requested a review March 22, 2025 17:48
Copy link

@pdp5 pdp5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have followed the steps as defined, run the test cases and all the test cases are processed successfully.
Test Cases

Copy link
Contributor

@vishavk1992 vishavk1992 left a 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!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.