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

Fix: Ensure Proper Date Selection in DatePicker Test Case #4284

Conversation

balajis-qb
Copy link

@balajis-qb balajis-qb commented Oct 1, 2023

Closes #4283

Proposed Changes:

  • Added logic to the it("should change dates of range change startDate when endDate set before startDate") test case in datepicker_test.test.js to ensure proper date selection.
  • Fixed the issue where the test was failing under specific conditions, particularly when the current date was at the beginning of a month.

Addressed the issue in the 'it("should change dates of range change startDate when endDate set before startDate")' test case in 'datepicker_test.test.js' where the test was failing under specific conditions. The problem occurred when attempting to select a date three days before the current date, especially when the current date fell at the beginning of a month. The fix includes logic to detect and navigate to the previous month when necessary, allowing the test case to select the desired date correctly.

Closes Hacker0x01#4283
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network.


@balajis-qb you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 29
- 7

100% JavaScript (tests)

Type of change

Fix - These changes are likely to be fixing a bug or issue.

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Merging #4284 (997f7cc) into main (6bbc587) will increase coverage by 0.04%.
The diff coverage is n/a.

❗ Current head 997f7cc differs from pull request most recent head cecd00c. Consider uploading reports for the commit cecd00c to get more accurate results

@@            Coverage Diff             @@
##             main    #4284      +/-   ##
==========================================
+ Coverage   96.34%   96.38%   +0.04%     
==========================================
  Files          25       25              
  Lines        2352     2352              
  Branches      958      958              
==========================================
+ Hits         2266     2267       +1     
+ Misses         86       85       -1     

see 1 file with indirect coverage changes

Copy link
Member

@martijnrusschen martijnrusschen left a comment

Choose a reason for hiding this comment

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

Nice!

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.

Test Case Failing Due to Incomplete Data Display in DatePicker Component
2 participants