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

Vijay Anand - Unit test weekly summaries report reducer #2932

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

Conversation

vijay10pk
Copy link
Contributor

Description

Added unit tests for the weeklySummariesReportReducer.

Related PRS (if any):

No related PRs.

Main changes explained:

  • Created a new test file weeklySummariesReportReducer.test.js under the tests directory.
  • Test cases include:
    • Returns the initial state when no valid action is provided.
    • Handles FETCH_SUMMARIES_REPORT_BEGIN by setting loading to true and clearing the error.
    • Handles FETCH_SUMMARIES_REPORT_SUCCESS by updating the summaries array and setting loading to false.
    • Handles FETCH_SUMMARIES_REPORT_ERROR by updating the error field and setting loading to false.
    • Handles UPDATE_SUMMARY_REPORT by updating the specific summary object in the summaries array.

How to test:

  1. Check out the current branch.
  2. Run npm install if necessary.
  3. Execute npm test weeklySummariesReportReducer.test.js.
  4. Verify that all test cases pass without any errors.

Screenshots or videos of changes:

image

Note:

Include the information the reviewers need to know.

Copy link

netlify bot commented Dec 7, 2024

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 36079b2
🔍 Latest deploy log https://app.netlify.com/sites/highestgoodnetwork-dev/deploys/6754d8f7b7c5f40008b1af2c
😎 Deploy Preview https://deploy-preview-2932--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.

@ppsahu
Copy link

ppsahu commented Dec 8, 2024

I have tested this PR and all the checks pass upon running the file. Below is the screenshot for your reference.

Screenshot 2024-12-07 at 5 43 57 PM

Copy link

@RashmiKY98 RashmiKY98 left a comment

Choose a reason for hiding this comment

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

No issues found. Reviewed and tested the test cases. The test cases covers all the scenarios.
Screenshot 2024-12-07 235347

@chappdev2019
Copy link
Member

all the checks pass

image

@pallavithorat
Copy link

I have reviewed the PR, and all test cases have been successfully passed.
Screenshot 2024-12-08 at 3 38 18 PM

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

Successfully merging this pull request may close these issues.

5 participants