Skip to content

Commit

Permalink
Support #35538 - Molecular Analysis Run view page bug and test coverage
Browse files Browse the repository at this point in the history
- Fixed issue with Molecular Analysis Run view not showing the metagenomic batch item run names.
- Updated test to have the correct network call.
  • Loading branch information
brandonandre committed Jan 17, 2025
1 parent 342676b commit 6727b7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function useMolecularAnalysisRunView({
async function fetchMetagenomicsBatchItems() {
const fetchPaths = molecularAnalysisRunItems.map(
(molecularAnalysisRunItem) =>
`seqdb-api/metagenomics-batch-item?include=pcrBatchItem&filter[rsql]=molecularAnalysisRunItem.uuid==${molecularAnalysisRunItem.id}`
`seqdb-api/metagenomics-batch-item?include=pcrBatchItem,molecularAnalysisRunItem&filter[rsql]=molecularAnalysisRunItem.uuid==${molecularAnalysisRunItem.id}`
);
const metagenomicsBatchItems: PersistedResource<MetagenomicsBatchItem>[] =
[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,16 +405,22 @@ export const TEST_METAGENOMIC_MOLECULAR_ANALYSIS_ITEMS: PersistedResource<Metage
{
id: "7de1c19c-6016-4e51-973c-f76e21385f72",
type: "metagenomics-batch-item",
molecularAnalysisRunItem:
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[0],
pcrBatchItem: TEST_PCR_BATCH_ITEMS[0] as any
},
{
id: "120cf8dd-9009-4a1b-b27a-c766095418f9",
type: "metagenomics-batch-item",
molecularAnalysisRunItem:
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[1],
pcrBatchItem: TEST_PCR_BATCH_ITEMS[1] as any
},
{
id: "f3152f83-4aa9-40d5-a88f-099dad53dd76",
type: "metagenomics-batch-item",
molecularAnalysisRunItem:
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[2],
pcrBatchItem: TEST_PCR_BATCH_ITEMS[2] as any
}
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ const mockGet = jest.fn(async (path, params) => {
return { data: [TEST_GENERIC_MOLECULAR_ANALYSIS_ITEMS[2]] };

// Metageneomic Batch Items
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem,molecularAnalysisRunItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[0].id:
return { data: [TEST_METAGENOMIC_MOLECULAR_ANALYSIS_ITEMS[0]] };
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem,molecularAnalysisRunItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[1].id:
return { data: [TEST_METAGENOMIC_MOLECULAR_ANALYSIS_ITEMS[1]] };
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
case "seqdb-api/metagenomics-batch-item?include=pcrBatchItem,molecularAnalysisRunItem&filter[rsql]=molecularAnalysisRunItem.uuid==" +
TEST_MOLECULAR_ANALYSIS_RUN_ITEMS_METAGENOMICS[2].id:
return { data: [TEST_METAGENOMIC_MOLECULAR_ANALYSIS_ITEMS[2]] };

Expand Down

0 comments on commit 6727b7f

Please sign in to comment.