From 28f309cbf990828b28d6324159051267a2cd8dd7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 31 Oct 2023 15:03:23 +0100 Subject: [PATCH] Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts We were not correctly mocking the config route from the tests Signed-off-by: Tomas Cohen Arazi --- t/cypress/integration/Preservation/Settings.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/t/cypress/integration/Preservation/Settings.ts b/t/cypress/integration/Preservation/Settings.ts index e72d4b5858..9aff16a927 100644 --- a/t/cypress/integration/Preservation/Settings.ts +++ b/t/cypress/integration/Preservation/Settings.ts @@ -38,19 +38,10 @@ describe("Processings", () => { cy.title().should("eq", "Koha staff interface"); cy.intercept( "GET", - "/cgi-bin/koha/svc/config/systempreferences/?pref=PreservationModule", - '{"value":"1"}' - ); - cy.intercept( - "GET", - "/cgi-bin/koha/svc/config/systempreferences/?pref=PreservationNotForLoanWaitingListIn", - '{"value":"24"}' - ); - cy.intercept( - "GET", - "/cgi-bin/koha/svc/config/systempreferences/?pref=PreservationNotForLoanDefaultTrainIn", - '{"value":"42"}' + "/api/v1/preservation/config", + '{"permissions":{"manage_sysprefs":"1"},"settings":{"enabled":"1","not_for_loan_default_train_in":"42","not_for_loan_waiting_list_in": "24"}}' ); + cy.intercept( "GET", "/api/v1/authorised_value_categories/NOT_LOAN/authorised_values", -- 2.39.5