Koha-clms/t/cypress/integration
Kyle M Hall b302481a4d
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!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-29 15:38:59 +00:00
..
Acquisitions Bug 42080: Add Cypress tests 2026-06-26 11:56:59 +00:00
Admin Bug 40191: Update Cypress tests for split button navigation changes 2026-01-22 09:25:55 -07:00
Auth Bug 40816: Fix Auth/csrf.ts 2026-04-23 09:24:53 -06:00
Circulation Bug 42862: Use current-relative dates in bookingsModalDatePicker_spec.ts 2026-06-29 15:38:59 +00:00
ERM Bug 41615: (follow-up) Simplify 'List license' test - visit licenses directly for 500 test 2026-03-21 16:10:00 +00:00
ILL Bug 37762: (QA follow-up): Warn and return 500 on schema validation failure in progress_request 2026-05-15 08:11:12 -06:00
Islands Bug 26355: (follow-up) Fix cypress tests 2026-05-07 07:56:15 -06:00
KohaTable Bug 42666: Add a Cypress test 2026-06-23 11:49:19 +00:00
OPAC Bug 42705: Fix SCO spec WebBasedSelfCheck setup 2026-06-02 15:07:22 +00:00
Patron Bug 42423: Add a Cypress test 2026-04-23 09:25:08 -06:00
Preservation Bug 40191: Update Cypress tests for split button navigation changes 2026-01-22 09:25:55 -07:00
SIP2 Bug 41311: Add ability for SIP to send patron home library ( branchcode ) in AO field 2026-04-23 16:04:07 -06:00
Tools Bug 42783: Fix ManageMarcImport_spec.ts 2026-06-08 14:16:25 +00:00
t Bug 41587: (follow-up) Remove unused imports causing webpack node: URI errors 2026-03-20 15:16:23 +00:00
AdditionalFields_spec.ts Bug 38446: Add a dedicated route to retrieve ERM-related additional fields 2025-11-17 15:15:38 -07:00
BiblioFrameworkCode_spec.ts Bug 42606: Add Cypress tests 2026-05-26 08:37:34 -06:00
Breadcrumbs_spec.ts Bug 38201: Add VueFramework cypress tests 2025-10-02 09:40:16 -06:00
HttpClient_spec.ts Bug 42705: Add HttpClient_spec.ts 2026-06-02 15:07:21 +00:00
InfiniteScrollSelect_spec.ts Bug 40191: Update Cypress tests for split button navigation changes 2026-01-22 09:25:55 -07:00
PatronSearchDebounce_spec.ts Bug 41039: Add cypress tests 2025-11-18 06:56:54 -07:00
Toolbar_spec.ts Bug 40430: Fix Toolbar_spec.ts 2025-07-21 14:01:28 -06:00
VueFramework_spec.ts Bug 38262: Fix VueFramework_spec.ts 2026-02-12 07:58:40 -07:00
flatpickr_spec.ts
…