From b91ff527a29d76cb10688c64f0a5b657a3daaaca Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Sun, 22 Mar 2026 06:42:29 +0000 Subject: [PATCH] Bug 23269: (RM follow-up) Strip item_group and item_level_holds_count from hold POST body Bug 23269 added item_group and item_level_holds_count to the hold response schema (hold.yaml). buildSampleObject reads hold.yaml to generate test hold objects, so these fields are now included in the generated object. However, the holds POST endpoint uses an inline schema with additionalProperties: false that does not include these fields, causing a 400 validation error when insertSampleHold tries to create a hold via the API. Add item_group and item_level_holds_count to the destructuring strip-list in insertObject so they are excluded from the POST body. Signed-off-by: Martin Renvoize --- t/cypress/plugins/insertData.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/cypress/plugins/insertData.js b/t/cypress/plugins/insertData.js index a784245dc6..8941eaaeeb 100644 --- a/t/cypress/plugins/insertData.js +++ b/t/cypress/plugins/insertData.js @@ -737,6 +737,8 @@ const insertObject = async ({ type, object, baseUrl, authHeader }) => { _strings, hold_group_id, item_level, + item_level_holds_count, + item_group, cancellation_requested, biblio, deleted_biblio,