Skip to content

Commit

Permalink
ACQUI-146: Landing page cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mblenk committed Jun 20, 2024
1 parent ec85aba commit ba81f15
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/cypress/e2e/Home_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,31 @@ describe("Acquisitions homepage", () => {
beforeEach(() => {
cy.login();
cy.title().should("eq", "Koha staff interface");
cy.intercept(
"GET",
"/api/v1/contrib/acquire/settings",
[
{
"explanation": "Select which modules you wish to use in the acquisitions portal",
"options": "",
"type": "multiple",
"value": "",
"variable": "modulesEnabled"
}
]
);
});

it("Should redirect to the new acquisitions module", () => {
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl");
cy.get("#acq2_homepage").contains("Homepage");
});

it("Should not have all modules available in the left hand menu", () => {
cy.visit("/cgi-bin/koha/acqui/acqui-home.pl");
cy.get("#navmenulist > h5").contains("Acquisitions");
cy.get("#navmenulist > ul").children().should("have.length", 2);
cy.get("#navmenulist > ul > li:nth-child(1) > span > a > span").contains("Tasks");
cy.get("#navmenulist > ul > li:nth-child(2) > span > a > span").contains("Settings");
})
});

0 comments on commit ba81f15

Please sign in to comment.