Bug 41173: Add a Cypress test

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-11-13 11:41:16 +01:00 committed by Lucas Gass
parent 7a614e4c67
commit 8af1ad8688
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 23 additions and 0 deletions

View File

@ -37,3 +37,26 @@ describe("Main component - pref on", () => {
cy.get(".main div[class='alert alert-warning']").should("not.exist");
});
});
describe("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);
});
});
});
});