From 7ec37ed0cd9e2391aa29030abacf3c2336a72f11 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 4 Nov 2025 15:40:52 +0000 Subject: [PATCH] Bug 41039: Add cypress tests Signed-off-by: Nick Clemens --- .../integration/PatronSearchDebounce_spec.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 t/cypress/integration/PatronSearchDebounce_spec.ts diff --git a/t/cypress/integration/PatronSearchDebounce_spec.ts b/t/cypress/integration/PatronSearchDebounce_spec.ts new file mode 100644 index 00000000000..8131231254d --- /dev/null +++ b/t/cypress/integration/PatronSearchDebounce_spec.ts @@ -0,0 +1,26 @@ +describe("members/members-home.pl", () => { + beforeEach(() => { + cy.login(); + }); + + it("Patron search button should toggle disabled state during search", function () { + // Visit the members home page + cy.visit("/cgi-bin/koha/members/members-home.pl"); + + // Find the patron search form and button + cy.get("form.patron_search_form").within(() => { + cy.get(".search_patron_filter_btn") + .should("exist") + .and("not.be.disabled") // Confirm enabled by default + .click(); + + // After clicking, the button should become disabled + cy.get(".search_patron_filter_btn").should("be.disabled"); + + // Watch for the button to become enabled again + cy.get(".search_patron_filter_btn", { timeout: 10000 }).should( + "not.be.disabled" + ); + }); + }); +}); -- 2.39.5