From 3f714003f459cf3c7c03f623e0431cd9c19b2966 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 --- 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 e72d4b5858b..9aff16a927d 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.34.1