Job
No job planned.
Difficulty
Medium
Cancel
Spec (updated on Wed Mar 11 15:17:03 2026)
describe("opac/yourlists", 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 virtualshelves(`shelfname`,`owner`,`public`,`sortfield`,`lastmodified`,`created_on`,`allow_change_from_owner`,`allow_change_from_others`,`allow_change_from_staff`,`allow_change_from_permitted_staff`) VALUES ('My favorite books', 51, 0, 'title','2026-03-11 14:28:20','2026-03-11 14:28:20',1,0,0,0)")
cy.query("INSERT INTO virtualshelves(`shelfname`,`owner`,`public`,`sortfield`,`lastmodified`,`created_on`,`allow_change_from_owner`,`allow_change_from_others`,`allow_change_from_staff`,`allow_change_from_permitted_staff`) VALUES ('To read', 51, 0, 'title','2026-03-11 14:28:20','2026-03-11 14:28:20',1,0,0,0)")
cy.loginOpac();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("yourlists", function () {
cy.visitOpac("/cgi-bin/koha/opac-shelves.pl?op=list");
cy.waitForPageLoad();
cy.get("#usershelves.maincontent").should('be.visible').screenshot("yourlists");
});
});
});
afterEach(function () {
cy.query("DELETE FROM virtualshelves WHERE (shelfname LIKE 'My favorite books' OR shelfname LIKE 'To read')")
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
opac-shelves.pl?op=list
Interface
opac
Log in
Yes
Element selector
#usershelves.maincontent
Missing selector
N
setup
sql INSERT INTO virtualshelves(`shelfname`,`owner`,`public`,`sortfield`,`lastmodified`,`created_on`,`allow_change_from_owner`,`allow_change_from_others`,`allow_change_from_staff`,`allow_change_from_permitted_staff`) VALUES ('My favorite books', 51, 0, 'title','2026-03-11 14:28:20','2026-03-11 14:28:20',1,0,0,0)
sql INSERT INTO virtualshelves(`shelfname`,`owner`,`public`,`sortfield`,`lastmodified`,`created_on`,`allow_change_from_owner`,`allow_change_from_others`,`allow_change_from_staff`,`allow_change_from_permitted_staff`) VALUES ('To read', 51, 0, 'title','2026-03-11 14:28:20','2026-03-11 14:28:20',1,0,0,0)
workflow
teardown
sql DELETE FROM virtualshelves WHERE (shelfname LIKE 'My favorite books' OR shelfname LIKE 'To read')
Notes
Cancel
Additional KTD data
Cancel