Koha-clms/t/cypress/integration/KohaTable
Jonathan Druart 16439a30a7
Bug 40344: Fix KohaTable_spec.ts
> Cannot read properties of undefined (reading 'description')

Not sure since which change this is failing but it has always been
wrong.

The code in patron-search.inc is:
        var categories = [% To.json(categories) | $raw %].map(e => {
            e['_id'] = e.categorycode.toLowerCase();
            e['_str'] = e.description;
            return e;
        });
        var categories_map = categories.reduce((map, e) => {
            map[e._id] = e;
            return map;
        }, {});

It's the keys that are lower cased.

Test plan:

  `yarn cypress run \
    --config video=false,screenshotOnRunFailure=false \
    --spec t/cypress/integration/KohaTable/KohaTable_spec.ts`
should return green

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7bc3b24827)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-24 10:23:27 +02:00
..
Holdings_spec.ts Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-10 22:47:37 +02:00
KohaTable_spec.ts Bug 40344: Fix KohaTable_spec.ts 2025-07-24 10:23:27 +02:00
PatronSearch_spec.ts Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-10 22:47:37 +02:00