Bug 40345

Summary: Missing Cypress tests for checkout history - OPAC
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38102, 40301, 40346    
Bug Blocks:    
Attachments: Bug 40345: Pass a patron to insertSampleCheckout
Bug 40345: Add insertSamplePatron
Bug 40345: Force checkout
Bug 40345: Add tests for bug 38102
Bug 40345: Properly cleanup old checkouts
Bug 40345: Pass a patron to insertSampleCheckout
Bug 40345: Add insertSamplePatron
Bug 40345: Force checkout
Bug 40345: Add tests for bug 38102
Bug 40345: Properly cleanup old checkouts
Bug 40345: Use then to prevent async issues

Description Jonathan Druart 2025-07-11 07:05:48 UTC
Change from bug 38102 must be covered by tests.
Comment 1 Jonathan Druart 2025-07-11 07:22:29 UTC
Created attachment 183974 [details] [review]
Bug 40345: Pass a patron to insertSampleCheckout

So we won't generate a new patron per checkout
Comment 2 Jonathan Druart 2025-07-11 07:22:31 UTC
Created attachment 183975 [details] [review]
Bug 40345: Add insertSamplePatron

So it's easier to build and insert a new patron
Comment 3 Jonathan Druart 2025-07-11 07:22:33 UTC
Created attachment 183976 [details] [review]
Bug 40345: Force checkout

Pass the confirmation token to force the checkout
Comment 4 Jonathan Druart 2025-07-11 07:22:35 UTC
Created attachment 183977 [details] [review]
Bug 40345: Add tests for bug 38102

Test plan:
  yarn cypress run --spec t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts
must return green

Revert commits from bug 38102
Run again the Cypress tests
=> They fail
Comment 5 Jonathan Druart 2025-07-11 09:16:28 UTC
Created attachment 183979 [details] [review]
Bug 40345: Properly cleanup old checkouts
Comment 6 Jonathan Druart 2025-07-11 12:16:16 UTC
Created attachment 183983 [details] [review]
Bug 40345: Pass a patron to insertSampleCheckout

So we won't generate a new patron per checkout
Comment 7 Jonathan Druart 2025-07-11 12:16:18 UTC
Created attachment 183984 [details] [review]
Bug 40345: Add insertSamplePatron

So it's easier to build and insert a new patron
Comment 8 Jonathan Druart 2025-07-11 12:16:20 UTC
Created attachment 183985 [details] [review]
Bug 40345: Force checkout

Pass the confirmation token to force the checkout
Comment 9 Jonathan Druart 2025-07-11 12:16:22 UTC
Created attachment 183986 [details] [review]
Bug 40345: Add tests for bug 38102

Test plan:
  yarn cypress run --spec t/cypress/integration/KohaTable/OPACCirculationHistory_spec.ts
must return green

Revert commits from bug 38102
Run again the Cypress tests
=> They fail
Comment 10 Jonathan Druart 2025-07-11 12:16:24 UTC
Created attachment 183987 [details] [review]
Bug 40345: Properly cleanup old checkouts
Comment 11 Jonathan Druart 2025-07-11 12:16:26 UTC
Created attachment 183988 [details] [review]
Bug 40345: Use then to prevent async issues