Job
Difficulty
Cancel
Spec (updated on Tue Mar 24 16:04:25 2026)
describe("admin/basicparams/librarygroupsactions", 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 library_groups (id, title, ft_hide_patron_info, ft_limit_item_editing, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group, ft_local_float_group) VALUES (1, \"Central libraries\", 0, 1, 1, 1, 1, 0);")
cy.query("INSERT INTO library_groups (id, parent_id, branchcode) VALUE (2, 1, \"CPL\"), (3, 1, \"IPT\"), (4, 1, \"MPL\")")
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("librarygroupsactions", function () {
cy.visit("/cgi-bin/koha/admin/library_groups.pl");
cy.waitForPageLoad();
cy.get(".library-groups > tbody > tr:nth-child(2) > td:nth-child(4) > div:nth-child(1) > button:nth-child(1)").click();
cy.get(".library-groups > tbody > tr:nth-child(2) > td:nth-child(4) > div:nth-child(1) > ul > li:nth-child(1)").addCursor();
cy.get("main").should('be.visible').screenshot("librarygroupsactions");
});
});
});
afterEach(function () {
cy.query("DELETE FROM library_groups WHERE id IN (1, 2, 3, 4);")
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
admin/library_groups.pl
Interface
staff
Element selector
main
Missing selector
Y
setup
sql INSERT INTO library_groups (id, title, ft_hide_patron_info, ft_limit_item_editing, ft_search_groups_opac, ft_search_groups_staff, ft_local_hold_group, ft_local_float_group) VALUES (1, "Central libraries", 0, 1, 1, 1, 1, 0);
sql INSERT INTO library_groups (id, parent_id, branchcode) VALUE (2, 1, "CPL"), (3, 1, "IPT"), (4, 1, "MPL")
workflow
click .library-groups > tbody > tr:nth-child(2) > td:nth-child(4) > div:nth-child(1) > button:nth-child(1)
add_cursor .library-groups > tbody > tr:nth-child(2) > td:nth-child(4) > div:nth-child(1) > ul > li:nth-child(1)
teardown
sql DELETE FROM library_groups WHERE id IN (1, 2, 3, 4);
Notes
The mouse is not at the good place...
Cancel
Additional KTD data
Cancel