Skip to content

Commit

Permalink
fix(components): commandText loadLabware to display labware nickname (#…
Browse files Browse the repository at this point in the history
…17527)

The api docs say: "If 'label' is specified, this is how the labware will
appear in the run log, Labware Position Check, and elsewhere in the
Opentrons App and on the touchscreen." The label is the user defined
labware name.
  • Loading branch information
jerader authored Feb 14, 2025
1 parent 5287385 commit da09753
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ describe('CommandText', () => {
{ i18nInstance: i18n }
)
screen.getByText(
'Load NEST 96 Well Plate 100 µL PCR Full Skirt in Magnetic Module GEN2 in Slot 1'
'Load NEST 96 Well Plate 100 µL PCR Full Skirt (1) in Magnetic Module GEN2 in Slot 1'
)
})
it('renders correct text for loadLabware in adapter', () => {
Expand Down Expand Up @@ -627,7 +627,9 @@ describe('CommandText', () => {
/>,
{ i18nInstance: i18n }
)
screen.getByText('Load NEST 96 Well Plate 100 µL PCR Full Skirt off deck')
screen.getByText(
'Load NEST 96 Well Plate 100 µL PCR Full Skirt (2) off deck'
)
})
it('renders correct text for reloadLabware', () => {
const reloadLabwareCommand = mockCommandTextData.commands.find(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export const getLoadCommandText = ({
loadedModules: commandTextData?.modules ?? [],
t,
})
const labwareName = command.result?.definition.metadata.displayName
const labwareName =
command.params.displayName ??
command.result?.definition.metadata.displayName
// use in preposition for modules and slots, on for labware and adapters
let displayLocation = t('in_location', { location })
if (
Expand Down

0 comments on commit da09753

Please sign in to comment.