Skip to content

Commit

Permalink
update tests accordingly to support multiple samples per slot
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrine33 committed Jan 23, 2024
1 parent 072cd12 commit 914b30c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/unit/components/visiumQC/qpcrResults.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { LabwareFlaggedFieldsFragment } from '../../../../src/types/sdk';
import { enableMapSet } from 'immer';
import { NewFlaggedLabwareLayout } from '../../../../src/types/stan';
import QPcrResults from '../../../../src/components/visiumQC/QPcrResults';
import { sampleFactory, tissueFactory } from '../../../../src/lib/factories/sampleFactory';
afterEach(() => {
cleanup();
});
Expand All @@ -26,10 +27,19 @@ const mockRemoveLabware = jest.fn();
const renderQpcrResults = () => {
const inputLabware = slideFactory.build() as NewFlaggedLabwareLayout;
const labware: LabwareFlaggedFieldsFragment = { ...inputLabware, barcode: inputLabware.barcode ?? '' };
const tissue = [tissueFactory.build({ externalName: 'test 1' }), tissueFactory.build({ externalName: 'test 2' })];
const initialProps = {
slotMeasurements: [
{ address: 'A1', name: 'Cq value', value: '0', externalName: 'test 1', sectionNumber: 1 },
{ address: 'A2', name: 'Cq value', value: '0', externalName: 'test 2', sectionNumber: 2 }
{
address: 'A1',
name: 'Cq value',
value: '0',
samples: [
sampleFactory.build({ section: 2, tissue: tissue[1] }),
sampleFactory.build({ section: 1, tissue: tissue[0] })
]
},
{ address: 'A2', name: 'Cq value', value: '0', samples: [] }
],
labware: labware,
removeLabware: mockRemoveLabware
Expand Down

0 comments on commit 914b30c

Please sign in to comment.