Bugzilla – Attachment 189650 Details for
Bug 41039
Patron search button can be spammed and trigger many API patron searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41039: Add cypress tests
Bug-41039-Add-cypress-tests.patch (text/plain), 1.59 KB, created by
Nick Clemens (kidclamp)
on 2025-11-18 01:21:51 UTC
(
hide
)
Description:
Bug 41039: Add cypress tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-11-18 01:21:51 UTC
Size:
1.59 KB
patch
obsolete
>From 7ec37ed0cd9e2391aa29030abacf3c2336a72f11 Mon Sep 17 00:00:00 2001 >From: John Doe <you@example.com> >Date: Tue, 4 Nov 2025 15:40:52 +0000 >Subject: [PATCH] Bug 41039: Add cypress tests > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41039
:
188063
|
188123
|
188191
|
189031
|
189032
|
189649
| 189650