Login

Screenshots for the Koha manual

New screenshots | All screenshots | Full test results | Manuals (wip)
en de el es fr hi zh_Hant

Image details

listdownloadcsv (#1697) ❌ Not validated

Job

Difficulty

Spec (updated on Thu Aug 27 12:12:39 2026)

describe("lists/listdownloadcsv", 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.expose("EN_TEST_FAILED")) {
                    this.skip();
                }
                cy.task("query", {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)"});
                cy.task("query", {sql: "INSERT INTO virtualshelfcontents VALUES (1, 19, NOW(), 51), (1, 283, NOW(), 51)"});
                cy.task("query", {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)"});
                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.task("query", {sql: "delete from virtualshelfcontents where borrowernumber=51"});
        cy.task("query", {sql: "delete from virtualshelves where shelfname='Austen'"});
        Cypress.expose('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.expose("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

Additional KTD data

Test failure

CypressError: `cy.task('query')` failed with the following error:

> Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`virtualshelfcontents`, CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE)

https://on.cypress.io/api/task

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `in en`
    at <unknown> (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:138872:70)
    at tryCatcher (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1777:23)
    at Promise._settlePromiseFromHandler (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1489:31)
    at Promise._settlePromise (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1546:18)
    at Promise._settlePromise0 (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1591:10)
    at Promise._settlePromises (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:1667:18)
    at _drainQueueStep (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2377:12)
    at _drainQueue (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2370:9)
    at Async._drainQueues (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2386:5)
    at Async.drainQueues (http://kohadev-intra.mydnsname.org:8081/__cypress/runner/cypress_runner.js:2256:14)
From Your Spec Code:
    at Context.eval (webpack://koha/./cypress/integration/lists/listdownloadcsv.ts:11:19)

From Node.js Internals:
  Error: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`virtualshelfcontents`, CONSTRAINT `virtualshelfcontents_ibfk_1` FOREIGN KEY (`shelfnumber`) REFERENCES `virtualshelves` (`shelfnumber`) ON DELETE CASCADE ON UPDATE CASCADE)
      at query (/e2e/cypress/plugins/db.js:61:37)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)

Thumbnails


Current Thumbnail old

Current

Old screenshot