From b591ca479622f9eaf43f34508ddddd46baa1f521 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 13 Nov 2025 11:41:16 +0100 Subject: [PATCH] Bug 41173: Add a Cypress test --- t/cypress/integration/ERM/Main.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/t/cypress/integration/ERM/Main.ts b/t/cypress/integration/ERM/Main.ts index 58dc5b90dc5..998ca5507cd 100644 --- a/t/cypress/integration/ERM/Main.ts +++ b/t/cypress/integration/ERM/Main.ts @@ -37,3 +37,26 @@ describe("Main component - pref on", () => { cy.get(".main div[class='alert alert-warning']").should("not.exist"); }); }); + +describe.only("Breadcrumb", () => { + beforeEach(() => { + cy.login(); + cy.title().should("eq", "Koha staff interface"); + cy.intercept( + "GET", + "/api/v1/erm/config", + '{"settings":{"ERMModule":"1","ERMProviders":["local"]}}' + ); + }); + + it("Home should not reload the app", () => { + cy.visit("/cgi-bin/koha/erm/agreements"); + cy.window().then(win => { + const originalWindow = win; + cy.get("#breadcrumbs").contains("E-resource management").click(); + cy.window().should(newWin => { + expect(newWin).to.equal(originalWindow); + }); + }); + }); +}); -- 2.34.1