From 6da63ed7d4207225527a03d95b739cf24574dab3 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 14 Jan 2026 17:14:55 +0000 Subject: [PATCH] Bug 41615: Fix Licenses_spec.ts Before applying patch, run: cypress run --spec t/cypress/integration/ERM/Licenses_spec.ts Notice it fails. Apply patch and run it again. Notice it passes. --- t/cypress/integration/ERM/Licenses_spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/cypress/integration/ERM/Licenses_spec.ts b/t/cypress/integration/ERM/Licenses_spec.ts index d8321dfba59..ae657b6d0e8 100644 --- a/t/cypress/integration/ERM/Licenses_spec.ts +++ b/t/cypress/integration/ERM/Licenses_spec.ts @@ -18,14 +18,22 @@ describe("License CRUD operations", () => { "/api/v1/erm/config", '{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' ); + cy.intercept("GET", "/api/v1/erm/licenses*", { + statusCode: 200, + body: [cy.get_license()], + headers: { + "X-Total-Count": "5", + }, + }).as("getDashboardLicenses"); }); it("List license", () => { + cy.visit("/cgi-bin/koha/erm/erm.pl"); + cy.wait("@getDashboardLicenses"); // GET license returns 500 cy.intercept("GET", "/api/v1/erm/licenses*", { statusCode: 500, }); - cy.visit("/cgi-bin/koha/erm/erm.pl"); cy.get(".sidebar_menu").contains("Licenses").click(); cy.get("main div[class='alert alert-warning']").contains( "Something went wrong: Error: Internal Server Error" -- 2.39.5