-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Test Case Failing Due to Incomplete Data Display in DatePicker Component #4283
Closed
balajis-qb opened this issue
Oct 1, 2023
· 3 comments
· Fixed by #4284 or jones58/personal-knowledge-wiki#29 · May be fixed by rowidanagah/EduMentorMate#9
Closed
Test Case Failing Due to Incomplete Data Display in DatePicker Component #4283
balajis-qb opened this issue
Oct 1, 2023
· 3 comments
· Fixed by #4284 or jones58/personal-knowledge-wiki#29 · May be fixed by rowidanagah/EduMentorMate#9
Comments
You can assign this issue to me. I fixed the test case, I'll raise a PR for it |
Nice catch, yes this test needs to be fixed. Pretty useless if it doesn't work on the 1st of the month :) |
balajis-qb
pushed a commit
to qburst/react-datepicker-3
that referenced
this issue
Oct 1, 2023
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
Thank you @martijnrusschen for assigning the issue. I fixed the test case. Kindly review my PR #4284 and let me know if any changes required |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Issue:
The test case located in
datepicker_test.test.js
, within thedescribe("selectsRange with inline")
block and namedit("should change dates of range change startDate when endDate set before startDate")
is currently failing under specific conditions.Problem:
In the above mentioned test-case, we attempt to find a date three days before the current date within a
DatePicker
component.However, this test case is failing in certain scenarios. The issue arises when the current date falls at the beginning of a month. In such cases, the
DatePicker
component does not display the previous month's data, which prevents us from selecting a date three days before the current date.To Reproduce
Normally, this issue will not occur, but I accidentally caught it on Oct. 1, 2023, as there were no fall-over days from last month in this month's week, so the component is not rendering the last month's data.
Suggested Solution:
To address this issue, we propose the following solution:
DatePicker
component does not display the previous month's data, we should navigate to the previous month programmatically.Expected behavior
With the suggested solution in place, the test case should be able to find and select a date three days before the current date, regardless of whether it falls at the beginning of the month.
Screenshots
The text was updated successfully, but these errors were encountered: