Files
calendar/apps
Anik Dhabal BabuGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
888a8d806d fix: correct incrementDate function in E2E tests to properly calculate next month date (#27501)
The incrementDate function was using .day() incorrectly, which sets the day
of the week for the CURRENT week rather than finding the same weekday in
the next month. This caused the function to return dates in the previous
month when the target date fell early in the week.

For example, when incrementing March 2, 2026 (Monday) by a month:
- Old behavior: April 2 (Thursday) + .day(1) = March 30 (wrong month!)
- New behavior: First Monday in April = April 6 (correct)

This bug caused flaky E2E test failures in booking-limits and duration-limits
tests because the 'year limit with multiple limits set' test would try to
book on a date that was still in the same month, which was blocked by the
month limit (3 bookings already existed in that month).

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-02-02 07:23:15 -03:00
..