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:
parent
e203ba8dcc
commit
d572b6f422
|
|
@ -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"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue