From d282746e769d539fa5582ad72bfb9077b6804c45 Mon Sep 17 00:00:00 2001 From: Mateusz Winiarczyk <mateusz.winiarczyk@appunite.com> Date: Wed, 14 Feb 2024 23:51:25 +0100 Subject: [PATCH] fix(search): fix drugs and chemicals searching --- .../BioEntitiesAccordion.component.test.tsx | 5 +++-- src/models/bioEntitySchema.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Map/Drawer/SearchDrawerWrapper/GroupedSearchResults/BioEntitiesAccordion/BioEntitiesAccordion.component.test.tsx b/src/components/Map/Drawer/SearchDrawerWrapper/GroupedSearchResults/BioEntitiesAccordion/BioEntitiesAccordion.component.test.tsx index b16f5069..d65d2915 100644 --- a/src/components/Map/Drawer/SearchDrawerWrapper/GroupedSearchResults/BioEntitiesAccordion/BioEntitiesAccordion.component.test.tsx +++ b/src/components/Map/Drawer/SearchDrawerWrapper/GroupedSearchResults/BioEntitiesAccordion/BioEntitiesAccordion.component.test.tsx @@ -73,7 +73,8 @@ describe('BioEntitiesAccordion - component', () => { }); expect(screen.getByText('Content (10)')).toBeInTheDocument(); - expect(screen.getByText('Core PD map (3)')).toBeInTheDocument(); - expect(screen.getByText('Histamine signaling (5)')).toBeInTheDocument(); + expect(screen.getByText('Core PD map (5)')).toBeInTheDocument(); + expect(screen.getByText('Histamine signaling (2)')).toBeInTheDocument(); + expect(screen.getByText('PRKN substrates (3)')).toBeInTheDocument(); }); }); diff --git a/src/models/bioEntitySchema.ts b/src/models/bioEntitySchema.ts index 5a66d612..a747e0cd 100644 --- a/src/models/bioEntitySchema.ts +++ b/src/models/bioEntitySchema.ts @@ -33,7 +33,7 @@ export const bioEntitySchema = z.object({ synonyms: z.array(z.string()), formerSymbols: z.array(z.string()), fullName: z.string().nullable(), - compartmentName: z.string().nullable(), + compartmentName: z.string().nullable().optional(), abbreviation: z.string().nullable(), formula: z.string().nullable(), glyph: glyphSchema.nullable(), -- GitLab