From 04b943c12fe5866fbc83c48a05f2f9b962e6f8f0 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 --- t/cypress/integration/Toolbar_spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 t/cypress/integration/Toolbar_spec.ts diff --git a/t/cypress/integration/Toolbar_spec.ts b/t/cypress/integration/Toolbar_spec.ts new file mode 100644 index 00000000000..729ca5cffba --- /dev/null +++ b/t/cypress/integration/Toolbar_spec.ts @@ -0,0 +1,18 @@ +describe("Sticky toolbar", () => { + beforeEach(() => { + cy.login(); + cy.title().should("eq", "Koha staff interface"); + }); + + 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.39.5 (Apple Git-154)