Skip to content

Commit

Permalink
rename slotMap to OT2SlotMap
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Feb 21, 2024
1 parent b2ab68c commit 0e8b095
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const iconSize = 20
const numRows = 4
const numCols = 3

export function SlotMap(props: SlotMapProps): JSX.Element {
export function OT2SlotMap(props: SlotMapProps): JSX.Element {
const { collisionSlots, occupiedSlots, isError } = props
const slots = OT2_SLOT_MAP_SLOTS
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
describe('SlotMap', () => {
describe('OT2SlotMap', () => {
it.todo('replace deprecated enzyme test')
})
2 changes: 1 addition & 1 deletion components/src/slotmap/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './SlotMap'
export * from './OT2SlotMap'
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FLEX_ROBOT_TYPE, OT2_ROBOT_TYPE } from '@opentrons/shared-data'
import {
DeckLocationSelect,
renderWithProviders,
SlotMap,
OT2SlotMap,
} from '@opentrons/components'
import { i18n } from '../../../../localization'
import { getRobotType } from '../../../../file-data/selectors'
Expand Down Expand Up @@ -37,7 +37,7 @@ const mockGetLabwareIsCompatible = getLabwareIsCompatible as jest.MockedFunction
const mockGetDisableModuleRestrictions = getDisableModuleRestrictions as jest.MockedFunction<
typeof getDisableModuleRestrictions
>
const mockSlotMap = SlotMap as jest.MockedFunction<typeof SlotMap>
const mockOT2SlotMap = OT2SlotMap as jest.MockedFunction<typeof OT2SlotMap>
const render = (props: React.ComponentProps<typeof EditModulesModal>) => {
return renderWithProviders(<EditModulesModal {...props} />, {
i18nInstance: i18n,
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Edit Modules Modal', () => {
mockGetLabwareIsCompatible.mockReturnValue(true)
mockGetDisableModuleRestrictions.mockReturnValue(false)
mockDeckLocationSelect.mockReturnValue(<div>mock DeckLocationSelect</div>)
mockSlotMap.mockReturnValue(<div>mock SlotMap</div>)
mockOT2SlotMap.mockReturnValue(<div>mock SlotMap</div>)
})
it('renders the edit modules modal for a temp on a flex', () => {
render(props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
ALIGN_CENTER,
JUSTIFY_SPACE_BETWEEN,
JUSTIFY_FLEX_END,
SlotMap,
OT2SlotMap,
usePrevious,
} from '@opentrons/components'
import {
Expand Down Expand Up @@ -413,9 +413,9 @@ const EditModulesModalComponent = (
paddingY={SPACING.spacing16}
>
{moduleType === THERMOCYCLER_MODULE_TYPE ? (
<SlotMap occupiedSlots={['7', '8', '10', '11']} />
<OT2SlotMap occupiedSlots={['7', '8', '10', '11']} />
) : (
<SlotMap
<OT2SlotMap
occupiedSlots={[`${field.value}`]}
isError={!fieldState.error}
/>
Expand Down
6 changes: 3 additions & 3 deletions protocol-designer/src/components/modules/ModuleRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import upperFirst from 'lodash/upperFirst'
import {
LabeledValue,
OutlineButton,
SlotMap,
OT2SlotMap,
Tooltip,
useHoverTooltip,
ModuleIcon,
Expand Down Expand Up @@ -51,7 +51,7 @@ export function ModuleRow(props: Props): JSX.Element {
const slot = moduleOnDeck?.slot
/*
TODO (ka 2020-2-3): This logic is very specific to this individual implementation
of SlotMap. Kept it here (for now?) because it spells out the different cases.
of OT2SlotMap. Kept it here (for now?) because it spells out the different cases.
*/
let slotDisplayName = null
let occupiedSlotsForMap: string[] = []
Expand Down Expand Up @@ -160,7 +160,7 @@ export function ModuleRow(props: Props): JSX.Element {
/>
) : (
<div {...targetProps}>
<SlotMap
<OT2SlotMap
occupiedSlots={occupiedSlotsForMap}
collisionSlots={collisionSlots}
/>
Expand Down

0 comments on commit 0e8b095

Please sign in to comment.