From bf169e05b17a22647cd1fc4db4c3ded78841e07b Mon Sep 17 00:00:00 2001 From: Jethary Date: Tue, 5 Mar 2024 14:03:50 -0500 Subject: [PATCH] delete ConnectedSlotMap since its no longer needed --- .../EditModulesModal/ConnectedSlotMap.tsx | 28 ------------------- .../__tests__/EditModulesModal.test.tsx | 9 ++---- 2 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 protocol-designer/src/components/modals/EditModulesModal/ConnectedSlotMap.tsx diff --git a/protocol-designer/src/components/modals/EditModulesModal/ConnectedSlotMap.tsx b/protocol-designer/src/components/modals/EditModulesModal/ConnectedSlotMap.tsx deleted file mode 100644 index b84fec56cfa..00000000000 --- a/protocol-designer/src/components/modals/EditModulesModal/ConnectedSlotMap.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react' -import { ControllerRenderProps } from 'react-hook-form' -import { SlotMap } from '@opentrons/components' -import { RobotType } from '@opentrons/shared-data' -import styles from './EditModules.module.css' -import type { EditModulesFormValues } from './index' - -interface ConnectedSlotMapProps { - robotType: RobotType - field: ControllerRenderProps - hasFieldError?: boolean -} - -export const ConnectedSlotMap = ( - props: ConnectedSlotMapProps -): JSX.Element | null => { - const { robotType, field, hasFieldError } = props - - return field.value ? ( -
- -
- ) : null -} diff --git a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx index 770275d29ce..6fa5fcda44c 100644 --- a/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx +++ b/protocol-designer/src/components/modals/EditModulesModal/__tests__/EditModulesModal.test.tsx @@ -9,22 +9,20 @@ import { getInitialDeckSetup } from '../../../../step-forms/selectors' import { getLabwareIsCompatible } from '../../../../utils/labwareModuleCompatibility' import { getDisableModuleRestrictions } from '../../../../feature-flags/selectors' import { EditModulesModal } from '../index' -import { ConnectedSlotMap } from '../ConnectedSlotMap' import type * as Components from '@opentrons/components' import type { ModuleOnDeck } from '../../../../step-forms' -vi.mock('../ConnectedSlotMap') vi.mock('../../../../file-data/selectors') vi.mock('../../../../step-forms/selectors') vi.mock('../../../../utils/labwareModuleCompatibility') vi.mock('../../../../feature-flags/selectors') -vi.mock('@opentrons/components', async (importOriginal) => { +vi.mock('@opentrons/components', async importOriginal => { const actual = await importOriginal() return { ...actual, - DeckLocationSelect: vi.fn(() => (
mock DeckLocationSelect
)), - OT2SlotMap: vi.fn(() => (
mock SlotMap
)) + DeckLocationSelect: vi.fn(() =>
mock DeckLocationSelect
), + OT2SlotMap: vi.fn(() =>
mock SlotMap
), } }) @@ -81,7 +79,6 @@ describe('Edit Modules Modal', () => { }) vi.mocked(getLabwareIsCompatible).mockReturnValue(true) vi.mocked(getDisableModuleRestrictions).mockReturnValue(false) - vi.mocked(ConnectedSlotMap).mockReturnValue(
mock ConnectedSlotMap
) }) afterEach(() => { cleanup()