https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39584
--- Comment #17 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 190822 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190822&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. Test coverage includes: - Lead period visual hints (CSS classes on hover) - Lead period conflict prevention with existing bookings - Lead period conflict prevention with past dates - Trail period visual hints (CSS classes on hover) - Trail period conflict prevention with existing bookings - Trail period should NOT limit max date when clear (BUG FIX TEST) - Full max range selection when trail period has no conflicts The critical bug being tested: Trail period should ONLY prevent selection when it conflicts with an existing booking. It should NOT subtract from the max date allowed by circulation rules. Currently, the trail period incorrectly reduces the max selectable end date even when no conflicts exist. Test setup: - Lead period: 2 days - Trail period: 3 days - Issue length: 14 days with 2 renewals of 7 days each - Max period: 28 days - Booking A (Days 5-7): Tests lead period conflicts - Booking B (Days 45-50): Tests trail period conflicts The test at line 977-1045 (TEST 4) specifically validates that the max end date (Day 37) is selectable when the trail period (Days 38-40) is clear, proving the trail period doesn't incorrectly reduce max date. These tests currently expose the bug and will pass once the JavaScript implementation is fixed. -- 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/
