Skip to content

Commit

Permalink
fix final tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Mar 21, 2024
1 parent 178ee8c commit 1983ec9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
TEMPERATURE_MODULE_V2,
THERMOCYCLER_MODULE_TYPE,
THERMOCYCLER_MODULE_V1,
fixtureP10SingleV2Specs,
} from '@opentrons/shared-data'
import { fixtureP10Single } from '@opentrons/shared-data/pipette/fixtures/name'
import { fixture_tiprack_10_ul } from '@opentrons/shared-data/labware/fixtures/2'
import { getStateAndContextTempTCModules } from '@opentrons/step-generation'
import {
Expand All @@ -28,7 +28,7 @@ beforeEach(() => {
const leftPipette = {
name: 'p10_single',
id: 'leftPipetteId',
spec: fixtureP10Single,
spec: fixtureP10SingleV2Specs,
tiprackLabwareDef: fixture_tiprack_10_ul,
}
const labwareOnMagModule = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { describe, it, beforeEach, expect } from 'vitest'
import {
fixtureP300SingleV2Specs,
LabwareDefinition2,
} from '@opentrons/shared-data'
import {
volumeInCapacityForMulti,
volumeInCapacityForMultiAspirate,
volumeInCapacityForMultiDispense,
} from '../utils'
import { fixtureP300Single } from '@opentrons/shared-data/pipette/fixtures/name'
import { fixture_tiprack_300_ul } from '@opentrons/shared-data/labware/fixtures/2'
import type { LabwareDefinition2 } from '@opentrons/shared-data'
import type { PipetteEntities } from '@opentrons/step-generation'
import type { FormData } from '../../../../form-types'

Expand All @@ -22,7 +24,7 @@ describe('utils', () => {
} as any
pipetteEntities = {
p300_single: {
spec: fixtureP300Single,
spec: fixtureP300SingleV2Specs,
tiprackLabwareDef: fixtureTiprack300ul,
},
} as any
Expand Down
8 changes: 6 additions & 2 deletions protocol-designer/src/steplist/formLevel/test/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ describe('volumeTooHigh', () => {
fieldsWithPipette = {
pipette: {
spec: {
maxVolume: 10,
liquids: {
default: {
maxVolume: 10,
},
},
},
tiprackLabwareDef: { ...fixture_tiprack_10_ul }, // max tip volume is 10 ul
},
Expand All @@ -35,7 +39,7 @@ describe('volumeTooHigh', () => {
}
// @ts-expect-error(sa, 2021-6-15): volumeTooHigh might return null, need to null check before property access
expect(volumeTooHigh(fields).title).toBe(
`Volume is greater than maximum pipette/tip volume (${fields.pipette.spec.maxVolume} ul)`
`Volume is greater than maximum pipette/tip volume (${fields.pipette.spec.liquids.default.maxVolume} ul)`
)
// @ts-expect-error(sa, 2021-6-15): volumeTooHigh might return null, need to null check before property access
expect(volumeTooHigh(fields).dependentFields).toEqual(['pipette', 'volume'])
Expand Down

0 comments on commit 1983ec9

Please sign in to comment.