https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42862
--- Comment #1 from Kyle M Hall (khall) <[email protected]> --- Created attachment 200604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200604&action=edit Bug 42862: Use current-relative dates in bookingsModalDatePicker_spec.ts The booking date picker tests fake "today" with cy.clock and create bookings on hardcoded June 2026 dates. The modal fetches existing bookings from from the api and that query uses the real current time, not the fake one in the browser. Once the real date passes the hardcoded dates, the server stops returning those bookings ( they are now in the past ), so the modal sees no conflicts and assertions such as "the date should have the leadDisable class" fail. This patch anchors each test's "today" to the start of next month based on the current date so the bookings always stay in the future and are returned no matter when the test runs. The 'any item' test also sets cy.clock before its second page reload because the freeze does not survive the reload. Test Plan: 1) On main run: yarn cypress run --spec t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts 2) Note the test fails 3) Apply this patch 4) Run the command again 5) Note all tests 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/
