Skip to content

Commit

Permalink
add basic tests for waste chute for transfer and consolidate
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Nov 16, 2023
1 parent 0dad76c commit 19e73d8
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
39 changes: 39 additions & 0 deletions step-generation/src/__tests__/consolidate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
pickUpTipHelper,
SOURCE_LABWARE,
AIR_GAP_META,
moveToAddressableAreaHelper,
dropTipInPlaceHelper,
} from '../fixtures'
import { DEST_WELL_BLOWOUT_DESTINATION } from '../utils'
import type { AspDispAirgapParams, CreateCommand } from '@opentrons/shared-data'
Expand Down Expand Up @@ -120,6 +122,43 @@ describe('consolidate single-channel', () => {
])
})

it('Minimal single-channel: A1 A2 to B1, 50uL with p300, drop in waste chute', () => {
const data = {
...mixinArgs,
sourceWells: ['A1', 'A2'],
volume: 50,
changeTip: 'once',
dropTipLocation: 'wasteChuteId',
dispenseAirGapVolume: 5,
} as ConsolidateArgs

invariantContext = {
...invariantContext,
additionalEquipmentEntities: {
wasteChuteId: {
name: 'wasteChute',
id: 'wasteChuteId',
location: 'cutoutD3',
},
},
}

const result = consolidate(data, invariantContext, initialRobotState)
const res = getSuccessResult(result)

expect(res.commands).toEqual([
pickUpTipHelper('A1'),
aspirateHelper('A1', 50),
aspirateHelper('A2', 50),
dispenseHelper('B1', 100),
airGapHelper('B1', 5, { labwareId: 'destPlateId' }),
moveToAddressableAreaHelper({
addressableAreaName: '1and8ChannelWasteChute',
}),
dropTipInPlaceHelper(),
])
})

it('Single-channel with exceeding pipette max: A1 A2 A3 A4 to B1, 150uL with p300', () => {
// TODO Ian 2018-05-03 is this a duplicate of exceeding max with changeTip="once"???
const data = {
Expand Down
36 changes: 36 additions & 0 deletions step-generation/src/__tests__/transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
SOURCE_LABWARE,
makeDispenseAirGapHelper,
AIR_GAP_META,
dropTipInPlaceHelper,
moveToAddressableAreaHelper,
} from '../fixtures'
import { FIXED_TRASH_ID } from '..'
import {
Expand Down Expand Up @@ -109,6 +111,40 @@ describe('pick up tip if no tip on pipette', () => {
expect(res.commands[0]).toEqual(pickUpTipHelper('A1'))
})
})
it('...once, drop tip in waste chute', () => {
invariantContext = {
...invariantContext,
additionalEquipmentEntities: {
wasteChuteId: {
name: 'wasteChute',
id: 'wasteChuteId',
location: 'cutoutD3',
},
},
}

noTipArgs = {
...noTipArgs,
changeTip: 'always',
dropTipLocation: 'wasteChuteId',
dispenseAirGapVolume: 5,
} as TransferArgs

const result = transfer(noTipArgs, invariantContext, robotStateWithTip)

const res = getSuccessResult(result)

expect(res.commands).toEqual([
pickUpTipHelper('A1'),
aspirateHelper('A1', 30),
dispenseHelper('B2', 30),
airGapHelper('B2', 5, { labwareId: 'destPlateId' }),
moveToAddressableAreaHelper({
addressableAreaName: '1and8ChannelWasteChute',
}),
dropTipInPlaceHelper(),
])
})

it('...never (should not pick up tip, and fail)', () => {
noTipArgs = {
Expand Down

0 comments on commit 19e73d8

Please sign in to comment.