Job
No job planned.
Difficulty
Medium
Cancel
Spec (updated on Thu Jun 19 14:27:14 2025)
describe("admin/globalprefs/allowstafftosetvisibilityforguarantor", function () {
const languages = ['en', 'es-ES', 'fr-FR'];
languages.forEach((lang) => {
describe(`in ${lang}`, () => {
beforeEach(function(){
// If previous test failed, skip this one
if (Cypress.env("TEST_FAILED")) {
this.skip();
}
cy.query("INSERT INTO borrower_relationships (guarantor_id, guarantee_id, relationship) VALUES (19, 37, \"father\")")
cy.query("UPDATE borrowers SET categorycode=\"K\" where borrowernumber=37")
cy.set_syspref("AllowStaffToSetCheckoutsVisibilityForGuarantor", "1");
cy.set_syspref("AllowStaffToSetFinesVisibilityForGuarantor", "1");
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("allowstafftosetvisibilityforguarantor", function () {
cy.visit("/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=37");
cy.waitForPageLoad();
cy.get("#memberentry_guarantor").should('be.visible').screenshot("allowstafftosetvisibilityforguarantor");
});
});
});
afterEach(function () {
cy.query("DELETE FROM borrower_relationships WHERE guarantor_id=19")
Cypress.env('PADDING_BEFORE_SCREENSHOT', undefined);
if (this.currentTest.state === 'failed') {
Cypress.env("TEST_FAILED", true);
}
});
});
Spec data
Page
/members/memberentry.pl?op=modify&destination=circ&borrowernumber=37
Interface
staff
Element selector
#memberentry_guarantor
Missing selector
N
setup
sql INSERT INTO borrower_relationships (guarantor_id, guarantee_id, relationship) VALUES (19, 37, "father")
sql UPDATE borrowers SET categorycode="K" where borrowernumber=37
set_syspref AllowStaffToSetCheckoutsVisibilityForGuarantor=1
set_syspref AllowStaffToSetFinesVisibilityForGuarantor=1
workflow
teardown
sql DELETE FROM borrower_relationships WHERE guarantor_id=19
Notes
- Set syspref AllowStaffToSetCheckoutsVisibilityForGuarantor to 1
- Edit a patron in the Child category
Cancel
Additional KTD data
Cancel