Skip to content

Commit de58010

Browse files
jeraderCarlos-fernandez
authored andcommitted
refactor(protocol-designer, step-generation): multi tiprack uses defURI instead of id (#15096)
closes AUTH-12
1 parent fc50cb7 commit de58010

25 files changed

+121
-104
lines changed

protocol-designer/fixtures/protocol/8/doItAllV3MigratedToV8.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"3961e4c0-75c7-11ea-b42f-4b64e50f43e5": {
7474
"pipette": "0b3f2210-75c7-11ea-b42f-4b64e50f43e5",
7575
"volume": "40",
76-
"tipRack": "0b44c760-75c7-11ea-b42f-4b64e50f43e5:opentrons/opentrons_96_tiprack_300ul/1",
76+
"tipRack": "opentrons/opentrons_96_tiprack_300ul/1",
7777
"changeTip": "always",
7878
"path": "multiDispense",
7979
"aspirate_wells_grouped": false,
@@ -175,7 +175,7 @@
175175
"mix_touchTip_mmFromBottom": 11.8,
176176
"dropTip_location": "8053a205-f2dc-4b1d-8d05-bf8233949e2e:trashBin",
177177
"nozzles": null,
178-
"tipRack": "0b44c760-75c7-11ea-b42f-4b64e50f43e5:opentrons/opentrons_96_tiprack_300ul/1",
178+
"tipRack": "opentrons/opentrons_96_tiprack_300ul/1",
179179
"mix_x_position": 0,
180180
"mix_y_position": 0,
181181
"blowout_z_offset": 0,

protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"3961e4c0-75c7-11ea-b42f-4b64e50f43e5": {
108108
"pipette": "0b3f2210-75c7-11ea-b42f-4b64e50f43e5",
109109
"volume": "30",
110-
"tipRack": "0b44c760-75c7-11ea-b42f-4b64e50f43e5:opentrons/opentrons_96_tiprack_300ul/1",
110+
"tipRack": "opentrons/opentrons_96_tiprack_300ul/1",
111111
"changeTip": "always",
112112
"path": "single",
113113
"aspirate_wells_grouped": false,

protocol-designer/fixtures/protocol/8/doItAllV7MigratedToV8.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"f9a294f1-f42b-4cae-893a-592405349d56": {
152152
"pipette": "2e7c6344-58ab-465c-b542-489883cb63fe",
153153
"volume": "100",
154-
"tipRack": "23ed35de-5bfd-4bb0-8f54-da99a2804ed9:opentrons/opentrons_flex_96_filtertiprack_50ul/1",
154+
"tipRack": "opentrons/opentrons_flex_96_filtertiprack_50ul/1",
155155
"changeTip": "always",
156156
"path": "single",
157157
"aspirate_wells_grouped": false,
@@ -227,7 +227,7 @@
227227
"mix_touchTip_mmFromBottom": null,
228228
"dropTip_location": "134504e1-b212-41cf-966d-2560deb5b693:trashBin",
229229
"nozzles": null,
230-
"tipRack": "23ed35de-5bfd-4bb0-8f54-da99a2804ed9:opentrons/opentrons_flex_96_filtertiprack_50ul/1",
230+
"tipRack": "opentrons/opentrons_flex_96_filtertiprack_50ul/1",
231231
"mix_x_position": 0,
232232
"mix_y_position": 0,
233233
"blowout_z_offset": 0,

protocol-designer/fixtures/protocol/8/doItAllV8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"d2f74144-a7bf-4ba2-aaab-30d70b2b62c7": {
112112
"pipette": "9fcd50d9-92b2-45ac-acf1-e2cf773feffc",
113113
"volume": "100",
114-
"tipRack": "f2d371ea-5146-4c89-8200-9c056a7f321a:opentrons/opentrons_flex_96_tiprack_1000ul/1",
114+
"tipRack": "opentrons/opentrons_flex_96_tiprack_1000ul/1",
115115
"changeTip": "always",
116116
"path": "single",
117117
"aspirate_wells_grouped": false,

protocol-designer/fixtures/protocol/8/example_1_1_0MigratedToV8.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"e7d36200-92a5-11e9-ac62-1b173f839d9e": {
7676
"pipette": "c6f45030-92a5-11e9-ac62-1b173f839d9e",
7777
"volume": "6",
78-
"tipRack": "c6f4ec70-92a5-11e9-ac62-1b173f839d9e:tiprack-10ul",
78+
"tipRack": "opentrons/opentrons_96_tiprack_10ul/1",
7979
"changeTip": "always",
8080
"path": "single",
8181
"aspirate_wells_grouped": false,
@@ -161,7 +161,7 @@
161161
"mix_touchTip_mmFromBottom": 30.5,
162162
"dropTip_location": "9b1c0d01-9d4f-4016-afe6-9e08b46acf5e:trashBin",
163163
"nozzles": null,
164-
"tipRack": "c6f4ec70-92a5-11e9-ac62-1b173f839d9e:tiprack-10ul",
164+
"tipRack": "opentrons/opentrons_96_tiprack_10ul/1",
165165
"mix_x_position": 0,
166166
"mix_y_position": 0,
167167
"blowout_z_offset": 0,

protocol-designer/fixtures/protocol/8/mix_8_0_0.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"mix_touchTip_mmFromBottom": null,
7575
"dropTip_location": "5ba7047d-d3e2-4845-9eaa-1974af796ead:trashBin",
7676
"nozzles": null,
77-
"tipRack": "f1c677c0-fc3a-11ea-8809-e959e7d61d96:opentrons/opentrons_96_tiprack_10ul/1",
77+
"tipRack": "opentrons/opentrons_96_tiprack_10ul/1",
7878
"mix_x_position": 0,
7979
"mix_y_position": 0,
8080
"blowout_z_offset": 0,

protocol-designer/fixtures/protocol/8/newAdvancedSettingsAndMultiTemp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"stepDetails": "",
5656
"pipette": "21087f15-4c03-4587-8a2b-1ba0b5a501a0",
5757
"volume": "10",
58-
"tipRack": "0d39213c-49c2-4170-bf19-4c09e1b72aca:opentrons/opentrons_flex_96_tiprack_50ul/1",
58+
"tipRack": "opentrons/opentrons_flex_96_tiprack_50ul/1",
5959
"changeTip": "always",
6060
"path": "single",
6161
"aspirate_wells_grouped": false,

protocol-designer/fixtures/protocol/8/ninetySixChannelFullAndColumn.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"83a095fa-b649-4105-99d4-177f1a3f363a": {
5151
"pipette": "de7da440-95ec-43e8-8723-851321fbd6f9",
5252
"volume": "10",
53-
"tipRack": "75aa666f-98d8-4af9-908e-963ced428580:opentrons/opentrons_flex_96_tiprack_50ul/1",
53+
"tipRack": "opentrons/opentrons_flex_96_tiprack_50ul/1",
5454
"changeTip": "always",
5555
"path": "single",
5656
"aspirate_wells_grouped": false,
@@ -107,7 +107,7 @@
107107
"f5ea3139-1585-4848-9d5f-832eb88c99ca": {
108108
"pipette": "de7da440-95ec-43e8-8723-851321fbd6f9",
109109
"volume": "10",
110-
"tipRack": "75aa666f-98d8-4af9-908e-963ced428580:opentrons/opentrons_flex_96_tiprack_50ul/1",
110+
"tipRack": "opentrons/opentrons_flex_96_tiprack_50ul/1",
111111
"changeTip": "always",
112112
"path": "single",
113113
"aspirate_wells_grouped": false,

protocol-designer/src/components/StepEditForm/fields/TiprackField.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ export function TiprackField(props: TiprackFieldProps): JSX.Element {
3030
const [targetProps, tooltipProps] = useHoverTooltip()
3131
const pipetteEntities = useSelector(getPipetteEntities)
3232
const options = useSelector(uiLabwareSelectors.getTiprackOptions)
33-
const defaultTipracks =
33+
const defaultTiprackUris =
3434
pipetteId != null ? pipetteEntities[pipetteId as string].tiprackDefURI : []
35-
const pipetteOptions = options.filter(option =>
36-
defaultTipracks.includes(option.defURI)
35+
const tiprackOptions = options.filter(option =>
36+
defaultTiprackUris.includes(option.value)
3737
)
38-
const hasMissingTiprack = defaultTipracks.length > pipetteOptions.length
3938

39+
const hasMissingTiprack = defaultTiprackUris.length > tiprackOptions.length
4040
return (
4141
<Box {...targetProps}>
4242
<FormGroup
4343
label={t('step_edit_form.tipRack')}
4444
className={styles.large_field}
4545
>
4646
<DropdownField
47-
options={pipetteOptions}
47+
options={tiprackOptions}
4848
name={name}
4949
value={String(value) != null ? String(value) : null}
5050
onBlur={onFieldBlur}

protocol-designer/src/components/StepEditForm/fields/__tests__/TiprackField.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ describe('TiprackField', () => {
4040
})
4141
vi.mocked(getTiprackOptions).mockReturnValue([
4242
{
43-
value: 'mockValue',
43+
value: 'mockDefURI1',
4444
name: 'tiprack1',
45-
defURI: 'mockDefURI1',
4645
},
4746
{
48-
value: 'mockValue',
47+
value: 'mockDefURI2',
4948
name: 'tiprack2',
50-
defURI: 'mockDefURI2',
5149
},
5250
])
5351
})

0 commit comments

Comments
 (0)