Bugzilla – Attachment 183976 Details for
Bug 40345
Missing Cypress tests for checkout history - OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40345: Force checkout
Bug-40345-Force-checkout.patch (text/plain), 1.40 KB, created by
Jonathan Druart
on 2025-07-11 07:22:33 UTC
(
hide
)
Description:
Bug 40345: Force checkout
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-11 07:22:33 UTC
Size:
1.40 KB
patch
obsolete
>From d0203c04e143b4d6e749d03400efa290cf225b26 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 Jul 2025 23:05:14 +0200 >Subject: [PATCH] Bug 40345: Force checkout > >Pass the confirmation token to force the checkout >--- > t/cypress/plugins/insertData.js | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/cypress/plugins/insertData.js b/t/cypress/plugins/insertData.js >index 482de34cbd0..bc92c26bad7 100644 >--- a/t/cypress/plugins/insertData.js >+++ b/t/cypress/plugins/insertData.js >@@ -517,8 +517,20 @@ const insertObject = async ({ type, object, baseUrl, authHeader }) => { > } else if (type == "checkout") { > const { issuer, patron, ...checkout } = object; > >+ let endpoint = "/api/v1/checkouts"; >+ // Force the checkout - we might need a parameter to control this behaviour later >+ await apiGet({ >+ endpoint: `/api/v1/checkouts/availability?item_id=${object.item_id}&patron_id=${object.patron_id}`, >+ baseUrl, >+ authHeader, >+ }).then(result => { >+ if (result.confirmation_token) { >+ endpoint += `?confirmation=${result.confirmation_token}`; >+ } >+ }); >+ > return apiPost({ >- endpoint: "/api/v1/checkouts", >+ endpoint, > body: checkout, > baseUrl, > authHeader, >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40345
:
183974
|
183975
|
183976
|
183977
|
183979
|
183983
|
183984
|
183985
|
183986
|
183987
|
183988