Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): quick transfer uses C2 for aspirate and dispense if labware is the same #16087

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -117,7 +117,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
Loading