From 7a6c0e8ccebacf33909ddce6b78e0949e6520248 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 15 Jan 2025 10:42:19 +0000 Subject: [PATCH] Bug 38899: Add a cypress test Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- t/cypress/integration/Toolbar_spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/cypress/integration/Toolbar_spec.ts b/t/cypress/integration/Toolbar_spec.ts index e7aaf19ec82..385634ad52d 100644 --- a/t/cypress/integration/Toolbar_spec.ts +++ b/t/cypress/integration/Toolbar_spec.ts @@ -33,4 +33,16 @@ describe("Sticky toolbar", () => { cy.get("#toolbar a").contains("Receive shipments").click(); cy.get("h1").contains("Receive shipment from vendor " + vendor.name); }); + + it("Should stick on scroll", () => { + cy.visit("/cgi-bin/koha/acqui/acqui-home.pl"); + + cy.get("#toolbar").contains("New vendor").click(); + cy.scrollTo("bottom"); + cy.get("#toolbar").should("be.visible"); + cy.get("#toolbar").should("have.class", "floating"); + + cy.scrollTo("top"); + cy.get("#toolbar").should("not.have.class", "floating"); + }); }); -- 2.34.1