Bugzilla – Attachment 184102 Details for
Bug 40344
KohaTable_spec.ts is failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40344: Fix KohaTable_spec.ts
Bug-40344-Fix-KohaTablespects.patch (text/plain), 2.15 KB, created by
Matt Blenkinsop
on 2025-07-15 13:39:48 UTC
(
hide
)
Description:
Bug 40344: Fix KohaTable_spec.ts
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-07-15 13:39:48 UTC
Size:
2.15 KB
patch
obsolete
>From b92c17fa1f18f3a85a7c900d0916fb00005d0a79 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 11 Jul 2025 06:30:26 +0200 >Subject: [PATCH] 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> >--- > t/cypress/integration/KohaTable/KohaTable_spec.ts | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/t/cypress/integration/KohaTable/KohaTable_spec.ts b/t/cypress/integration/KohaTable/KohaTable_spec.ts >index 035404c11ae..3c0ca843fd6 100644 >--- a/t/cypress/integration/KohaTable/KohaTable_spec.ts >+++ b/t/cypress/integration/KohaTable/KohaTable_spec.ts >@@ -333,7 +333,7 @@ describe("kohaTable (using REST API)", () => { > > cy.window().then(win => { > win.categories_map = patrons.reduce((map, p) => { >- map[p.category_id] = p.category_id; >+ map[p.category_id.toLowerCase()] = p.category_id; > return map; > }, {}); > }); >@@ -399,7 +399,7 @@ describe("kohaTable (using REST API)", () => { > > cy.window().then(win => { > win.categories_map = patrons.reduce((map, p) => { >- map[p.category_id] = p.category_id; >+ map[p.category_id.toLowerCase()] = p.category_id; > return map; > }, {}); > }); >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40344
:
183971
|
184102
|
184156