|
Line 0
Link Here
|
| 0 |
- |
1 |
describe("members/members-home.pl", () => { |
|
|
2 |
beforeEach(() => { |
| 3 |
cy.login(); |
| 4 |
}); |
| 5 |
|
| 6 |
it("Patron search button should toggle disabled state during search", function () { |
| 7 |
// Visit the members home page |
| 8 |
cy.visit("/cgi-bin/koha/members/members-home.pl"); |
| 9 |
|
| 10 |
// Find the patron search form and button |
| 11 |
cy.get("form.patron_search_form").within(() => { |
| 12 |
cy.get(".search_patron_filter_btn") |
| 13 |
.should("exist") |
| 14 |
.and("not.be.disabled") // Confirm enabled by default |
| 15 |
.click(); |
| 16 |
|
| 17 |
// After clicking, the button should become disabled |
| 18 |
cy.get(".search_patron_filter_btn").should("be.disabled"); |
| 19 |
|
| 20 |
// Watch for the button to become enabled again |
| 21 |
cy.get(".search_patron_filter_btn", { timeout: 10000 }).should( |
| 22 |
"not.be.disabled" |
| 23 |
); |
| 24 |
}); |
| 25 |
}); |
| 26 |
}); |