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

Paul Derscheid <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #191765|0                           |1
        is obsolete|                            |

--- Comment #29 from Paul Derscheid <[email protected]> ---
Created attachment 191855
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=191855&action=edit
Bug 39584: Add Cypress tests for bookings lead and trail period behavior

This commit adds comprehensive Cypress tests for the lead and trail period
functionality in the bookings modal date picker. These tests validate the
hover effects, conflict detection, and date selection constraints.

The tests use cy.clock() to fix "today" to June 10, 2026, enabling
deterministic testing without date arithmetic complications.

Test coverage includes:
- Lead period visual hints (CSS classes on hover)
- Lead period conflict prevention with past dates
- Lead period conflict prevention with existing bookings
- Trail period visual hints (CSS classes on hover)
- Trail period conflict prevention with existing bookings
- Max date selection when trail period is clear (no false restrictions)

Test setup:
- Fixed date: June 10, 2026
- Lead period: 2 days
- Trail period: 3 days
- Issue length: 3 days with 2 renewals of 2 days each
- Max booking period: 7 days
- Blocker booking: June 25-27 (tests both lead and trail conflicts)

Test phases:
1. Hover June 13 - lead period (June 11-12) is clear, no leadDisable
2. Select June 13, hover June 16 - trail period (June 17-19) is clear
3a. Hover June 11 - lead period includes past date (June 9), leadDisable
3b. Hover June 29 - lead period overlaps blocker (June 27), leadDisable
4. Select June 20, hover June 23 - trail overlaps blocker, trailDisable
5. Select June 13, hover June 20 (max) - trail is clear, selectable

Signed-off-by: Kristi Krueger <[email protected]>

-- 
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