diff --git a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx index 8bf424afb4661848e7bd3a3b29204b4fe305eb1f..2d60852eae90f9bb1e2912beca4ba75806913b93 100644 --- a/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx +++ b/src/components/Map/Drawer/BioEntityDrawer/BioEntityDrawer.component.tsx @@ -1,7 +1,7 @@ -import { DrawerHeading } from '@/shared/DrawerHeading'; -import { useAppSelector } from '@/redux/hooks/useAppSelector'; -import { searchedFromMapBioEntityElement } from '@/redux/bioEntity/bioEntity.selectors'; import { ZERO } from '@/constants/common'; +import { searchedFromMapBioEntityElement } from '@/redux/bioEntity/bioEntity.selectors'; +import { useAppSelector } from '@/redux/hooks/useAppSelector'; +import { DrawerHeading } from '@/shared/DrawerHeading'; import { AnnotationItem } from './AnnotationItem'; import { AssociatedSubmap } from './AssociatedSubmap'; @@ -26,7 +26,7 @@ export const BioEntityDrawer = (): React.ReactNode => { /> <div className="flex flex-col gap-6 p-6"> <div className="text-sm font-normal"> - Compartment: <b className="font-semibold">{bioEntityData.compartment}</b> + Compartment: <b className="font-semibold">{bioEntityData.compartmentName}</b> </div> {bioEntityData.fullName && ( <div className="text-sm font-normal"> 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 bc8a61dd7415b6d6eb0dd483cfe127505814db94..b16f506928a7236df0d2f84d783eecd727667fdf 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 @@ -1,6 +1,6 @@ +import { bioEntitiesContentFixture } from '@/models/fixtures/bioEntityContentsFixture'; import { MODELS_MOCK } from '@/models/mocks/modelsMock'; import { StoreType } from '@/redux/store'; -import { bioEntitiesContentFixture } from '@/models/fixtures/bioEntityContentsFixture'; import { Accordion } from '@/shared/Accordion'; import { InitialStoreState, @@ -73,7 +73,7 @@ describe('BioEntitiesAccordion - component', () => { }); expect(screen.getByText('Content (10)')).toBeInTheDocument(); - expect(screen.getByText('Core PD map (4)')).toBeInTheDocument(); - expect(screen.getByText('Histamine signaling (1)')).toBeInTheDocument(); + expect(screen.getByText('Core PD map (3)')).toBeInTheDocument(); + expect(screen.getByText('Histamine signaling (5)')).toBeInTheDocument(); }); }); diff --git a/src/models/bioEntitySchema.ts b/src/models/bioEntitySchema.ts index 9014bc87adf7f13953309a6bb3e094cc9e39359b..5a66d6127dfd206538d4a971782c5aea5fed4125 100644 --- a/src/models/bioEntitySchema.ts +++ b/src/models/bioEntitySchema.ts @@ -1,13 +1,13 @@ import { z } from 'zod'; -import { referenceSchema } from './referenceSchema'; -import { glyphSchema } from './glyphSchema'; -import { modificationResiduesSchema } from './modificationResiduesSchema'; -import { submodelSchema } from './submodelSchema'; import { colorSchema } from './colorSchema'; -import { productsSchema } from './products'; +import { glyphSchema } from './glyphSchema'; import { lineSchema } from './lineSchema'; +import { modificationResiduesSchema } from './modificationResiduesSchema'; import { operatorSchema } from './operatorSchema'; +import { productsSchema } from './products'; +import { referenceSchema } from './referenceSchema'; import { structuralStateSchema } from './structuralStateSchema'; +import { submodelSchema } from './submodelSchema'; export const bioEntitySchema = z.object({ id: z.number(), @@ -33,6 +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(), abbreviation: z.string().nullable(), formula: z.string().nullable(), glyph: glyphSchema.nullable(),