Job
No job planned.
Difficulty
Medium
Easy
Medium
Hard
Impossible with Cypress Studio
Cancel
Spec (updated on Wed Dec 24 08:43:07 2025)
describe("tools/patronlists/addmultiplepatrons", 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.query("INSERT INTO patron_lists (patron_list_id, name, owner, shared) VALUES (1, 'Test patron list', 1, 0)")
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("addmultiplepatrons", function () {
cy.visit("/cgi-bin/koha/patron_lists/list.pl?patron_list_id=1##");
cy.waitForPageLoad();
cy.get("#add_patrons_by_id").click();
cy.get("#patrons_by_id").should('be.visible');
cy.get("main").should('be.visible').screenshot("addmultiplepatrons");
});
});
});
afterEach(function () {
cy.query("DELETE FROM patron_lists WHERE patron_list_id=1")
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
patron_lists/list.pl?patron_list_id=1#
Interface
staff
Element selector
main
Missing selector
N
setup
sql INSERT INTO patron_lists (patron_list_id, name, owner, shared) VALUES (1, 'Test patron list', 1, 0)
workflow
click #add_patrons_by_id
wait_for_visible #patrons_by_id
teardown
sql DELETE FROM patron_lists WHERE patron_list_id=1
Notes
Cancel
Additional KTD data
Cancel
Test failure AssertionError: Timed out retrying after 10000ms: expected '<textarea#patrons_by_id>' to be 'visible'
This element `<textarea#patrons_by_id>` is not visible because its parent `<span#patron_ids_line>` has CSS property: `display: none`
at Context.eval (webpack://koha/./cypress/integration/tools/patronlists/addmultiplepatrons.ts:20:41)