-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Background Information
Currently, tests that require selecting a date spanning across different months (e.g., selecting a date from the past month when the current view is the present month) fail. The Cypress command tries to click on a day number, but since the calendar hasn't navigated to the correct month, the target day is either disabled or incorrect (e.g., clicking on the 20th of the current month instead of the 20th of the previous month).
How
- Created a new command: Implemented a global Cypress command called
selectDatePickerDate. - Used
dayjs: The command accepts adayjsobject to determine the target month and year. - Automatic Navigation: The command checks the current calendar view:
- If the target date is in a past month, it clicks the "Previous month" button.
- If the target date is in a future month, it clicks the "Next month" button.
- Click Day: After navigating, it clicks the specific day number.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Review