Job
Difficulty
Cancel
Spec (updated on Wed Mar 25 15:27:06 2026)
describe("admin/globalprefs/lastpatron", 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.env("EN_TEST_FAILED")) {
this.skip();
}
cy.set_syspref("showLastPatron", "1");
cy.set_syspref("showLastPatronCount", "5");
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("lastpatron", function () {
cy.visit("/cgi-bin/koha/koha/mainpage.pl");
cy.waitForPageLoad();
cy.get("#patronsearch").type("\"Acevedo\"");
cy.get("#patronsearch > button:nth-child(3)").click();
cy.waitForPageLoad();
cy.get("#patronsearch").type("\"Peters Tommy\"");
cy.get("#patronsearch > button:nth-child(3)").click();
cy.waitForPageLoad();
cy.get("#patronsearch").type("\"Mcconnell\"");
cy.get("#patronsearch > button:nth-child(3)").click();
cy.waitForPageLoad();
cy.get("#patronsearch").type("\"King\"");
cy.get("#patronsearch > button:nth-child(3)").click();
cy.waitForPageLoad();
cy.get("#patronsearch").type("\"Daniels\"");
cy.get("#patronsearch > button:nth-child(3)").click();
cy.waitForPageLoad();
cy.get(".breadcrumb-item:nth-child(1) > a:nth-child(1)").click();
cy.waitForPageLoad();
cy.get("#lastborrower-window button.btn.btn-link.navbar-btn.dropdown-toggle.dropdown-toggle-split").click();
cy.get("#lastBorrowerList").should('be.visible').screenshot("lastpatron");
});
});
});
afterEach(function () {
cy.set_syspref("showLastPatron", "0");
cy.set_syspref("showLastPatronCount", "0");
Cypress.env('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.env("EN_TEST_FAILED", true);
}
});
});
Spec data
Page
koha/mainpage.pl
Interface
staff
Element selector
#lastBorrowerList
Missing selector
N
setup
set_syspref showLastPatron=1
set_syspref showLastPatronCount=5
workflow
type #patronsearch="Acevedo"
click #patronsearch > button:nth-child(3)
wait_for_page_load
type #patronsearch="Peters Tommy"
click #patronsearch > button:nth-child(3)
wait_for_page_load
type #patronsearch="Mcconnell"
click #patronsearch > button:nth-child(3)
wait_for_page_load
type #patronsearch="King"
click #patronsearch > button:nth-child(3)
wait_for_page_load
type #patronsearch="Daniels"
click #patronsearch > button:nth-child(3)
wait_for_page_load
click .breadcrumb-item:nth-child(1) > a:nth-child(1)
wait_for_page_load
click #lastborrower-window button.btn.btn-link.navbar-btn.dropdown-toggle.dropdown-toggle-split
teardown
set_syspref showLastPatron=0
set_syspref showLastPatronCount=0
Notes
Cancel
Additional KTD data
Cancel