diff --git a/protocol-designer/src/assets/localization/en/starting_deck_state.json b/protocol-designer/src/assets/localization/en/starting_deck_state.json index 9730fccd669..c2060dc3fcf 100644 --- a/protocol-designer/src/assets/localization/en/starting_deck_state.json +++ b/protocol-designer/src/assets/localization/en/starting_deck_state.json @@ -16,7 +16,6 @@ "reservoir": "Reservoir", "starting_deck_state": "Starting deck state", "tipRack": "Tip rack", - "tiprack": "Tiprack", "tubeRack": "Tube rack", "wellPlate": "Well plate" } diff --git a/protocol-designer/src/pages/StartingDeckState/DeckSetupTools.tsx b/protocol-designer/src/pages/StartingDeckState/DeckSetupTools.tsx index b47f623cb90..77bafdf659f 100644 --- a/protocol-designer/src/pages/StartingDeckState/DeckSetupTools.tsx +++ b/protocol-designer/src/pages/StartingDeckState/DeckSetupTools.tsx @@ -53,7 +53,7 @@ interface DeckSetupToolsProps { onCloseClick: () => void } -export const DeckSetupTools = (props: DeckSetupToolsProps): JSX.Element => { +export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element { const { slot, onCloseClick, cutoutId } = props const { t } = useTranslation(['starting_deck_state', 'shared']) const robotType = useSelector(getRobotType) @@ -182,7 +182,7 @@ export const DeckSetupTools = (props: DeckSetupToolsProps): JSX.Element => { // create module dispatch( createModule({ - slot: slot, + slot, type: getModuleType(moduleModel), model: moduleModel, }) diff --git a/protocol-designer/src/pages/StartingDeckState/LabwareTools.tsx b/protocol-designer/src/pages/StartingDeckState/LabwareTools.tsx index 092f8d5dad6..77e83434204 100644 --- a/protocol-designer/src/pages/StartingDeckState/LabwareTools.tsx +++ b/protocol-designer/src/pages/StartingDeckState/LabwareTools.tsx @@ -6,6 +6,7 @@ import { useDispatch, useSelector } from 'react-redux' import { COLORS, DIRECTION_COLUMN, + DISPLAY_INLINE_BLOCK, Flex, ListButton, ListButtonAccordion, @@ -55,7 +56,8 @@ import type { LabwareDefByDefURI } from '../../labware-defs' import type { Fixture } from './constants' const CUSTOM_CATEGORY = 'custom' - +const STANDARD_X_DIMENSION = 127.75 +const STANDARD_Y_DIMENSION = 85.48 interface LabwareToolsProps { slot: DeckSlotId selectedHardware: ModuleModel | Fixture | null @@ -67,7 +69,7 @@ interface LabwareToolsProps { selectedNestedSelectedLabwareDefURI: string | null } -export const LabwareTools = (props: LabwareToolsProps): JSX.Element => { +export function LabwareTools(props: LabwareToolsProps): JSX.Element { const { slot, selectedHardware, @@ -81,10 +83,8 @@ export const LabwareTools = (props: LabwareToolsProps): JSX.Element => { const dispatch = useDispatch>() const permittedTipracks = useSelector(stepFormSelectors.getPermittedTipracks) const pipetteEntities = useSelector(getPipetteEntities) - const has96Channel = getHas96Channel(pipetteEntities) const customLabwareDefs = useSelector(getCustomLabwareDefsByURI) const deckSetup = useSelector(stepFormSelectors.getInitialDeckSetup) - const defs = getOnlyLatestDefs() // TODO(ja, 8/16/24): We are always filtering recommended labware, check with designs // where to add the filter checkbox/button const [filterRecommended, setFilterRecommended] = React.useState( @@ -95,6 +95,8 @@ export const LabwareTools = (props: LabwareToolsProps): JSX.Element => { ) const [filterHeight, setFilterHeight] = React.useState(false) + const has96Channel = getHas96Channel(pipetteEntities) + const defs = getOnlyLatestDefs() const modulesById = deckSetup.modules const moduleModel = MODULE_MODELS.includes(selectedHardware as ModuleModel) ? (selectedHardware as ModuleModel) @@ -134,8 +136,8 @@ export const LabwareTools = (props: LabwareToolsProps): JSX.Element => { const { dimensions, parameters } = labwareDef const { xDimension, yDimension } = dimensions - const isSmallXDimension = xDimension < 127.75 - const isSmallYDimension = yDimension < 85.48 + const isSmallXDimension = xDimension < STANDARD_X_DIMENSION + const isSmallYDimension = yDimension < STANDARD_Y_DIMENSION const isIrregularSize = isSmallXDimension && isSmallYDimension const isAdapter = labwareDef.allowedRoles?.includes('adapter') @@ -388,7 +390,7 @@ export const LabwareTools = (props: LabwareToolsProps): JSX.Element => { const StyledLabel = styled.label` text-decoration: ${TYPOGRAPHY.textDecorationUnderline}; text-align: ${TYPOGRAPHY.textAlignCenter}}; - display: inline-block; + display: ${DISPLAY_INLINE_BLOCK} cursor: pointer; input[type='file'] { display: none; diff --git a/protocol-designer/src/pages/StartingDeckState/__tests__/LabwareTools.test.tsx b/protocol-designer/src/pages/StartingDeckState/__tests__/LabwareTools.test.tsx index e5da876760c..99f71c61191 100644 --- a/protocol-designer/src/pages/StartingDeckState/__tests__/LabwareTools.test.tsx +++ b/protocol-designer/src/pages/StartingDeckState/__tests__/LabwareTools.test.tsx @@ -83,12 +83,12 @@ describe('LabwareTools', () => { // set labware expect(props.setSelectedLabwareDefURI).toHaveBeenCalled() }) - it('renders slot with heater-shaker on it and selects an adapter and labware', () => { - props.selectedHardware = HEATERSHAKER_MODULE_V1 - props.selecteLabwareDefURI = 'fixture/opentrons_universal_flat_adapter/1' + it('renders deck slot and selects an adapter and labware', () => { + props.selecteLabwareDefURI = + 'fixture/fixture_universal_flat_bottom_adapter/1' render(props) screen.getByText('Adapter') - fireEvent.click(screen.getAllByTestId('ListButton_noActive')[0]) + fireEvent.click(screen.getAllByTestId('ListButton_noActive')[4]) // set adapter fireEvent.click( screen.getByRole('label', { @@ -97,7 +97,12 @@ describe('LabwareTools', () => { ) // set labware screen.getByText('Adapter compatible labware') - fireEvent.click(screen.getAllByRole('label')[1]) + screen.getByText('Fixture Corning 96 Well Plate 360 µL Flat') + fireEvent.click( + screen.getByRole('label', { + name: 'Fixture Corning 96 Well Plate 360 µL Flat', + }) + ) expect(props.setNestedSelectedLabwareDefURI).toHaveBeenCalled() }) diff --git a/protocol-designer/src/pages/StartingDeckState/__tests__/utils.test.tsx b/protocol-designer/src/pages/StartingDeckState/__tests__/utils.test.ts similarity index 100% rename from protocol-designer/src/pages/StartingDeckState/__tests__/utils.test.tsx rename to protocol-designer/src/pages/StartingDeckState/__tests__/utils.test.ts diff --git a/protocol-designer/src/pages/StartingDeckState/constants.ts b/protocol-designer/src/pages/StartingDeckState/constants.ts index 292cc897b4c..7ce6f66b5c5 100644 --- a/protocol-designer/src/pages/StartingDeckState/constants.ts +++ b/protocol-designer/src/pages/StartingDeckState/constants.ts @@ -36,14 +36,14 @@ export const OT2_MODULE_MODELS: ModuleModel[] = [ export type Fixture = | 'stagingArea' - | 'wasteChute' | 'trashBin' + | 'wasteChute' | 'wasteChuteAndStagingArea' export const FIXTURES: Fixture[] = [ 'stagingArea', - 'wasteChute', 'trashBin', + 'wasteChute', 'wasteChuteAndStagingArea', ] diff --git a/shared-data/js/__tests__/labwareDefSchemaV2.test.ts b/shared-data/js/__tests__/labwareDefSchemaV2.test.ts index 8af653b1b3f..0f063a0bfa6 100644 --- a/shared-data/js/__tests__/labwareDefSchemaV2.test.ts +++ b/shared-data/js/__tests__/labwareDefSchemaV2.test.ts @@ -284,15 +284,9 @@ describe('test schemas of all v2 labware fixtures', () => { }) it(`fixture file name matches loadName: ${labwarePath}`, () => { - // filtering out this fixture since we need the exact loadName to test - // for PD's heater-shaker adapter/labware combos - if ( - labwareDef.parameters.loadName !== 'opentrons_universal_flat_adapter' - ) { - expect(labwareDef.parameters.loadName).toEqual( - path.basename(filename, '.json') - ) - } + expect(labwareDef.parameters.loadName).toEqual( + path.basename(filename, '.json') + ) }) it(`namespace is "fixture": ${labwarePath}`, () => { diff --git a/shared-data/labware/fixtures/2/fixture_corning_96_wellplate_360_flat.json b/shared-data/labware/fixtures/2/fixture_corning_96_wellplate_360_flat.json index 49600c83c4a..cfdf552484b 100644 --- a/shared-data/labware/fixtures/2/fixture_corning_96_wellplate_360_flat.json +++ b/shared-data/labware/fixtures/2/fixture_corning_96_wellplate_360_flat.json @@ -1049,15 +1049,10 @@ "version": 2, "schemaVersion": 2, "stackingOffsetWithLabware": { - "opentrons_universal_flat_adapter": { + "fixture_universal_flat_bottom_adapter": { "x": 0, "y": 0, "z": 10.22 - }, - "opentrons_aluminum_flat_bottom_plate": { - "x": 0, - "y": 0, - "z": 5.45 } } } diff --git a/shared-data/labware/fixtures/2/fixture_universal_flat_bottom_adapter.json b/shared-data/labware/fixtures/2/fixture_universal_flat_bottom_adapter.json index 2a6dcb1d412..d91f6729547 100644 --- a/shared-data/labware/fixtures/2/fixture_universal_flat_bottom_adapter.json +++ b/shared-data/labware/fixtures/2/fixture_universal_flat_bottom_adapter.json @@ -11,9 +11,9 @@ "tags": [] }, "dimensions": { - "xDimension": 111, - "yDimension": 75, - "zDimension": 12 + "xDimension": 156.5, + "yDimension": 93, + "zDimension": 132 }, "wells": {}, "groups": [ @@ -27,7 +27,7 @@ "quirks": [], "isTiprack": false, "isMagneticModuleCompatible": false, - "loadName": "opentrons_universal_flat_adapter" + "loadName": "fixture_universal_flat_bottom_adapter" }, "namespace": "fixture", "version": 1,