Job
Difficulty
Medium
Cancel
Spec (updated on Thu Aug 27 12:11:34 2026)
describe("admin/globalprefs/allowstafftosetvisibilityforguarantor", function () {
const languages = ['en', 'es-ES', 'fr-FR', 'de-DE', 'el-GR', 'hi', 'zh-Hant-TW'];
languages.forEach((lang) => {
describe(`in ${lang}`, () => {
beforeEach(function(){
// Skip if 'en' test failed
if (Cypress.expose("EN_TEST_FAILED")) {
this.skip();
}
cy.task("query", {sql: "INSERT INTO borrower_relationships (guarantor_id, guarantee_id, relationship) VALUES (19, 37, \"father\")"});
cy.task("query", {sql: "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.task("query", {sql: "DELETE FROM borrower_relationships WHERE guarantor_id=19"});
Cypress.expose('PADDING_BEFORE_SCREENSHOT', undefined);
// Set EN_TEST_FAILED if the 'en' test failed
if (this.currentTest.parent.title.includes('in en') && this.currentTest.state === 'failed') {
Cypress.expose("EN_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