diff --git a/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx b/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx index faee30bfb56..3a6922f86be 100644 --- a/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx +++ b/app/src/organisms/CalibrationPanels/__tests__/DeckSetup.test.tsx @@ -1,7 +1,8 @@ import * as React from 'react' import { fireEvent, screen } from '@testing-library/react' +import { vi, it, describe, expect } from 'vitest' + import { getDeckDefinitions } from '@opentrons/shared-data' -import { vi, it, describe, expect, beforeEach } from 'vitest' import { renderWithProviders } from '../../../__testing-utils__' import { i18n } from '../../../i18n' @@ -14,22 +15,15 @@ import * as Sessions from '../../../redux/sessions' import { DeckSetup } from '../DeckSetup' -import type * as OpentronsComponent from '@opentrons/components' - vi.mock('../../../assets/labware/getLabware') -vi.mock('@opentrons/shared-data') -vi.mock( - '@opentrons/components/src/hardware-sim/Deck/RobotWorkSpace', - async importOriginal => { - const actual = await importOriginal< - typeof OpentronsComponent.RobotWorkSpace - >() - return { - ...actual, - RobotWorkSpace: () => <>, - } +vi.mock('@opentrons/shared-data', async importOriginal => { + const actual = await importOriginal() + return { + ...actual, + getDeckDefinitions: () => vi.fn(), } -) +}) +vi.mock('@opentrons/components/src/hardware-sim/Deck/RobotWorkSpace') describe('DeckSetup', () => { const mockSendCommands = vi.fn() @@ -65,10 +59,6 @@ describe('DeckSetup', () => { ) } - beforeEach(() => { - vi.mocked(getDeckDefinitions).mockReturnValue({}) - }) - it('clicking continue proceeds to next step', () => { render() fireEvent.click(screen.getByRole('button', { name: 'Confirm placement' }))