Skip to content

Commit

Permalink
fix(app): quick transfer uses C2 for aspirate and dispense if labware…
Browse files Browse the repository at this point in the history
… is the same (#16087)

fix RQA-3073
  • Loading branch information
smb2268 authored Aug 22, 2024
1 parent e367986 commit 3f01d7c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/quick_transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"set_transfer_volume": "Set transfer volume",
"source": "Source",
"source_labware": "Source labware",
"source_labware_d2": "Source labware in D2",
"source_labware_c2": "Source labware in C2",
"starting_well": "starting well",
"storage_limit_reached": "Storage limit reached",
"tip_drop_location": "Tip drop location",
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/QuickTransferFlow/SelectDestLabware.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export function SelectDestLabware(
onChange={() => {
setSelectedLabware('source')
}}
buttonLabel={t('source_labware_d2')}
buttonValue="source-labware-d2"
buttonLabel={t('source_labware_c2')}
buttonValue="source-labware-c2"
subButtonLabel={state.source.metadata.displayName}
/>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('SelectDestLabware', () => {
},
})
render(props)
screen.getByText('Source labware in D2')
screen.getByText('Source labware in C2')
screen.getByText('source labware name')
})
it('enables continue button if you select a labware', () => {
Expand All @@ -109,7 +109,7 @@ describe('SelectDestLabware', () => {
})
const continueBtn = screen.getByTestId('ChildNavigation_Primary_Button')
expect(continueBtn).toBeDisabled()
const sourceLabware = screen.getByText('Source labware in D2')
const sourceLabware = screen.getByText('Source labware in C2')
fireEvent.click(sourceLabware)
expect(continueBtn).toBeEnabled()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,23 @@ export function generateQuickTransferArgs(
const flowRatesForSupportedTip =
quickTransferState.pipette.liquids.default.supportedTips[tipType]
const pipetteEntity = Object.values(invariantContext.pipetteEntities)[0]
const labwareEntityValues = Object.values(invariantContext.labwareEntities)
const sourceLabwareEntity = labwareEntityValues.find(
entity =>
entity.labwareDefURI === getLabwareDefURI(quickTransferState.source)

const sourceLabwareId = Object.keys(robotState.labware).find(
labwareId => robotState.labware[labwareId].slot === 'C2'
)
const sourceLabwareEntity =
sourceLabwareId != null
? invariantContext.labwareEntities[sourceLabwareId]
: undefined
let destLabwareEntity = sourceLabwareEntity
if (quickTransferState.destination !== 'source') {
destLabwareEntity = labwareEntityValues.find(
entity =>
entity.labwareDefURI ===
getLabwareDefURI(quickTransferState.destination as LabwareDefinition2)
const destinationLabwareId = Object.keys(robotState.labware).find(
labwareId => robotState.labware[labwareId].slot === 'D2'
)
destLabwareEntity =
destinationLabwareId != null
? invariantContext.labwareEntities[destinationLabwareId]
: undefined
}

let nozzles = null
Expand Down

0 comments on commit 3f01d7c

Please sign in to comment.