Bug 41039: Add cypress tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f59557d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
John Doe 2025-11-04 15:40:52 +00:00 committed by Paul Derscheid
parent e203ba8dcc
commit d572b6f422
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 26 additions and 0 deletions

View File

@ -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"
);
});
});
});