Job
Difficulty
Cancel
Spec (updated on Mon Jun 1 03:47:52 2026)
describe("lists/listdownloadcsv", function () {
const languages = ['en'];
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 ('Austen', 51, 0, 'title', NOW(), NOW(), 1, 0, 0, 0)")
cy.query("INSERT INTO virtualshelfcontents VALUES (1, 19, NOW(), 51), (1, 283, NOW(), 51)")
cy.query("INSERT INTO export_format (profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type, used_for, staff_only) VALUES ('Simple export', 'Simple export example', '100a|245a|264|300', ',', '#', '|', 'utf8', 'marc', 'export_records', 0)")
cy.login();
/* No specific padding defined */
cy.set_cookie_lang(lang);
});
it("listdownloadcsv", function () {
cy.visit("/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=1");
cy.waitForPageLoad();
cy.get("main").should('be.visible').screenshot("listdownloadcsv");
});
});
});
afterEach(function () {
cy.query("delete from virtualshelfcontents where borrowernumber=51")
cy.query("delete from virtualshelves where shelfname='Austen'")
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
virtualshelves/shelves.pl?op=view&shelfnumber=1
Interface
staff
Element selector
main
Missing selector
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 ('Austen', 51, 0, 'title', NOW(), NOW(), 1, 0, 0, 0)
sql INSERT INTO virtualshelfcontents VALUES (1, 19, NOW(), 51), (1, 283, NOW(), 51)
sql INSERT INTO export_format (profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type, used_for, staff_only) VALUES ('Simple export', 'Simple export example', '100a|245a|264|300', ',', '#', '|', 'utf8', 'marc', 'export_records', 0)
workflow
teardown
sql delete from virtualshelfcontents where borrowernumber=51
sql delete from virtualshelves where shelfname='Austen'
Notes
Cancel
Additional KTD data
Cancel