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

--- Comment #5 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 200262
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200262&action=edit
Bug 42432: Add Cypress regression tests for 'On hold due date'

Add integration tests covering the two branches of the renewal
due-date picker in the patron checkouts table:

1. When a row's item has an outstanding hold, ticking the Renew
   checkbox exposes the 'On hold due date' input; the value
   entered there must be the date_due sent to /cgi-bin/koha/svc/renew
   when 'Renew or check in selected items' is clicked. This is the
   branch that was silently broken by Bug 36084.
2. When a row's item has no hold, the 'On hold due date' input is
   not relevant; the value in 'Renewal due date' must be used
   instead. This guards against regressions that would flip the
   branches.

The specs intercept POST /cgi-bin/koha/svc/renew (the form-urlencoded
endpoint invoked by CirculationAPIClient.checkouts.renew) and assert
directly on the 'date_due' form parameter in the request body, which
is the narrowest stable observable for this behaviour.

Test plan:
1. Apply the previous patch in this series.
2. Run:
   npx cypress run --spec \\
     t/cypress/integration/Circulation/OnHoldDueDate_spec.ts
3. Both tests pass.
4. Temporarily revert the previous patch so the JS fix is undone.
5. Re-run the spec; the first test ('sends the On hold due date
   value to svc/renew for on-hold items') fails and the second test
   still passes -- demonstrating that the spec captures the
   regression.

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