https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707

--- Comment #32 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 191361
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191361&action=edit
Bug 37707: Add Cypress tests for timezone handling in place_booking modal

This patch adds comprehensive timezone tests to validate that the
place_booking modal handles dates correctly regardless of browser
timezone differences from the server.

Test Coverage:
1. Date Index Creation Consistency
   - Validates bookings display on correct calendar dates
   - Tests the dayjs().format('YYYY-MM-DD') fix

2. Multi-Day Booking Span
   - Ensures 3-day bookings span exactly 3 days
   - Prevents UTC conversion from adding extra days

3. Date Comparison Consistency
   - Verifies conflict detection works across timezones
   - Tests normalized start-of-day comparisons

4. API Submission Round-Trip
   - Validates dates survive browser → API → database flow
   - Checks RFC3339 handling and timezone offset preservation

5. Cross-Month Boundary
   - Tests bookings spanning month boundaries
   - Validates no date shifts at month transitions

These tests validate the timezone fixes in place_booking.js and ensure
bookings work correctly for users in any timezone.

Test plan:
Run inside KTD container:
  docker exec --user kohadev-koha --workdir /kohadevbox/koha -i \
    kohadev-koha-1 bash -c 'npx cypress run --spec \
    "t/cypress/integration/Circulation/bookingsModalTimezone_spec.ts"'

Expected result: All 5 tests should pass

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to