Skip to content

Commit

Permalink
fix cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Jul 28, 2023
1 parent f67cc10 commit b9aef5e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ describe('Advanced Settings for Transfer Form', () => {
// Verify that volume is set
cy.get('[id=TipPositionField_aspirate_touchTip_mmFromBottom]').should(
'have.value',
24
13.78
)
// Click on step 3 to verify that touchTip has volume set
cy.get('[data-test="StepItem_3"]').click()
Expand All @@ -344,7 +344,7 @@ describe('Advanced Settings for Transfer Form', () => {
// Verify that volume is set
cy.get('[id=TipPositionField_aspirate_touchTip_mmFromBottom]').should(
'have.value',
24
13.78
)
})

Expand Down
88 changes: 16 additions & 72 deletions protocol-designer/fixtures/protocol/5/transferSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
}
},
"ingredLocations": {
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1": {
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1": {
"A1": {
"0": {
"volume": 1000
"volume": 100
}
}
},
Expand Down Expand Up @@ -177,7 +177,7 @@
"labwareLocationUpdate": {
"trashId": "12",
"3e047fb0-3412-11eb-ad93-ed232a2337cf:opentrons/opentrons_96_tiprack_1000ul/1": "2",
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1": "4",
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1": "4",
"60e8b050-3412-11eb-ad93-ed232a2337cf:opentrons/corning_24_wellplate_3.4ml_flat/1": "5",
"aac5d680-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1": "3e012450-3412-11eb-ad93-ed232a2337cf:magneticModuleType",
"ada13110-3412-11eb-ad93-ed232a2337cf:opentrons/opentrons_96_aluminumblock_generic_pcr_strip_200ul/1": "3e0283e0-3412-11eb-ad93-ed232a2337cf:temperatureModuleType",
Expand Down Expand Up @@ -252,7 +252,7 @@
"path": "single",
"aspirate_wells_grouped": false,
"aspirate_flowRate": null,
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"aspirate_wells": ["A1"],
"aspirate_wellOrder_first": "t2b",
"aspirate_wellOrder_second": "l2r",
Expand Down Expand Up @@ -300,7 +300,7 @@
"path": "single",
"aspirate_wells_grouped": false,
"aspirate_flowRate": null,
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"aspirate_wells": ["A1"],
"aspirate_wellOrder_first": "t2b",
"aspirate_wellOrder_second": "l2r",
Expand Down Expand Up @@ -348,7 +348,7 @@
"path": "single",
"aspirate_wells_grouped": false,
"aspirate_flowRate": null,
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"aspirate_wells": ["A1"],
"aspirate_wellOrder_first": "t2b",
"aspirate_wellOrder_second": "l2r",
Expand Down Expand Up @@ -396,7 +396,7 @@
"path": "single",
"aspirate_wells_grouped": false,
"aspirate_flowRate": null,
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"aspirate_wells": ["A1"],
"aspirate_wellOrder_first": "t2b",
"aspirate_wellOrder_second": "l2r",
Expand Down Expand Up @@ -448,7 +448,7 @@
"path": "single",
"aspirate_wells_grouped": false,
"aspirate_flowRate": null,
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"aspirate_labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"aspirate_wells": ["A1"],
"aspirate_wellOrder_first": "t2b",
"aspirate_wellOrder_second": "l2r",
Expand Down Expand Up @@ -520,10 +520,10 @@
"displayName": "Opentrons 96 Tip Rack 1000 µL",
"definitionId": "opentrons/opentrons_96_tiprack_1000ul/1"
},
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1": {
"5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1": {
"slot": "4",
"displayName": "NEST 1 Well Reservoir 195 mL",
"definitionId": "opentrons/nest_1_reservoir_195ml/1"
"displayName": "NEST 96 Well Plate 100 µL PCR Full Skirt",
"definitionId": "opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1"
},
"60e8b050-3412-11eb-ad93-ed232a2337cf:opentrons/corning_24_wellplate_3.4ml_flat/1": {
"slot": "5",
Expand Down Expand Up @@ -2649,62 +2649,6 @@
"z": 0
}
},
"opentrons/nest_1_reservoir_195ml/1": {
"ordering": [["A1"]],
"brand": {
"brand": "NEST",
"brandId": ["360103"],
"links": [
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
"displayName": "NEST 1 Well Reservoir 195 mL",
"displayCategory": "reservoir",
"displayVolumeUnits": "mL",
"tags": []
},
"dimensions": {
"xDimension": 127.76,
"yDimension": 85.48,
"zDimension": 31.4
},
"wells": {
"A1": {
"depth": 25,
"shape": "rectangular",
"xDimension": 106.8,
"yDimension": 71.2,
"totalLiquidVolume": 195000,
"x": 63.88,
"y": 42.74,
"z": 4.55
}
},
"groups": [
{
"metadata": {
"wellBottomShape": "v"
},
"wells": ["A1"]
}
],
"parameters": {
"format": "trough",
"isTiprack": false,
"isMagneticModuleCompatible": false,
"quirks": ["centerMultichannelOnWells", "touchTipDisabled"],
"loadName": "nest_1_reservoir_195ml"
},
"namespace": "opentrons",
"version": 1,
"schemaVersion": 2,
"cornerOffsetFromSlot": {
"x": 0,
"y": 0,
"z": 0
}
},
"opentrons/corning_24_wellplate_3.4ml_flat/1": {
"ordering": [
["A1", "B1", "C1", "D1"],
Expand Down Expand Up @@ -5301,7 +5245,7 @@
"params": {
"pipette": "3dff4f90-3412-11eb-ad93-ed232a2337cf",
"volume": 100,
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"well": "A1",
"offsetFromBottomMm": 1,
"flowRate": 137.35
Expand Down Expand Up @@ -5339,7 +5283,7 @@
"params": {
"pipette": "3dff4f90-3412-11eb-ad93-ed232a2337cf",
"volume": 100,
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:oopentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"well": "A1",
"offsetFromBottomMm": 1,
"flowRate": 137.35
Expand Down Expand Up @@ -5377,7 +5321,7 @@
"params": {
"pipette": "3dff4f90-3412-11eb-ad93-ed232a2337cf",
"volume": 100,
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"well": "A1",
"offsetFromBottomMm": 1,
"flowRate": 137.35
Expand Down Expand Up @@ -5415,7 +5359,7 @@
"params": {
"pipette": "3dff4f90-3412-11eb-ad93-ed232a2337cf",
"volume": 100,
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"well": "A1",
"offsetFromBottomMm": 1,
"flowRate": 137.35
Expand Down Expand Up @@ -5453,7 +5397,7 @@
"params": {
"pipette": "4da579b0-a9bf-11eb-bce6-9f1d5b9c1a1b",
"volume": 20,
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_1_reservoir_195ml/1",
"labware": "5ae317e0-3412-11eb-ad93-ed232a2337cf:opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1",
"well": "A1",
"offsetFromBottomMm": 1,
"flowRate": 7.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ const SourceDestBatchEditMoveLiquidFields = (props: {

const isTouchTipNotSupportedLabware = getTouchTipNotSupportedLabware(

Check warning on line 66 in protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx#L66

Added line #L66 was not covered by tests
allLabware,
getLabwareIdForPositioningField(addFieldNamePrefix('touchTip_checkbox')) ??
undefined
getLabwareIdForPositioningField(
addFieldNamePrefix('touchTip_mmFromBottom')
) ?? undefined
)

let disabledTouchTip: boolean = false

Check warning on line 73 in protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/components/BatchEditForm/BatchEditMoveLiquid.tsx#L73

Added line #L73 was not covered by tests
Expand Down Expand Up @@ -139,12 +140,7 @@ const SourceDestBatchEditMoveLiquidFields = (props: {
label={i18n.t('form.step_edit_form.field.touchTip.label')}
className={styles.small_field}
tooltipContent={
getTouchTipNotSupportedLabware(
allLabware,
getLabwareIdForPositioningField(
addFieldNamePrefix('touchTip_checkbox')
) ?? undefined
)
isTouchTipNotSupportedLabware
? i18n.t('tooltip.step_fields.touchTip.disabled')
: propsForFields[addFieldNamePrefix('touchTip_checkbox')]
.tooltipContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ export const SourceDestFields = (props: SourceDestFieldsProps): JSX.Element => {
const { className, formData, prefix, propsForFields, allLabware } = props

const addFieldNamePrefix = makeAddFieldNamePrefix(prefix)
const isTouchTipNotSupportedLabware = getTouchTipNotSupportedLabware(
allLabware,
formData[
getLabwareFieldForPositioningField(
addFieldNamePrefix('touchTip_checkBox')
)
]
)
const getDelayFields = (): JSX.Element => (
<DelayFields
checkboxFieldName={addFieldNamePrefix('delay_checkbox')}
Expand Down Expand Up @@ -129,14 +121,28 @@ export const SourceDestFields = (props: SourceDestFieldsProps): JSX.Element => {
<CheckboxRowField
{...propsForFields[addFieldNamePrefix('touchTip_checkbox')]}
tooltipContent={
isTouchTipNotSupportedLabware
getTouchTipNotSupportedLabware(
allLabware,
formData[
getLabwareFieldForPositioningField(
addFieldNamePrefix('touchTip_mmFromBottom')
)
]
)
? i18n.t('tooltip.step_fields.touchTip.disabled')
: propsForFields[addFieldNamePrefix('touchTip_checkbox')]
.tooltipContent
}
label={i18n.t('form.step_edit_form.field.touchTip.label')}
className={styles.small_field}
disabled={isTouchTipNotSupportedLabware}
disabled={getTouchTipNotSupportedLabware(
allLabware,
formData[
getLabwareFieldForPositioningField(
addFieldNamePrefix('touchTip_mmFromBottom')
)
]
)}
>
<TipPositionField
{...propsForFields[addFieldNamePrefix('touchTip_mmFromBottom')]}
Expand Down

0 comments on commit b9aef5e

Please sign in to comment.