From 8c96b57a57cb0b5f8e765162dfe24165b56da182 Mon Sep 17 00:00:00 2001 From: koji Date: Fri, 13 Dec 2024 17:39:40 -0500 Subject: [PATCH] fix test error --- .../ProtocolSteps/__tests__/ProtocolSteps.test.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx index 104c10cf505..31c1c93eafc 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx @@ -20,6 +20,7 @@ import { getEnableHotKeysDisplay } from '../../../../feature-flags/selectors' import { DeckSetupContainer } from '../../DeckSetup' import { OffDeck } from '../../Offdeck' import { SubStepsToolbox } from '../Timeline' +import { DraggableSidebar } from '../DraggableSidebar' import { ProtocolSteps } from '..' import type { SavedStepFormState } from '../../../../step-forms' @@ -32,6 +33,7 @@ vi.mock('../StepForm') vi.mock('../../DeckSetup') vi.mock('../StepSummary.tsx') vi.mock('../Timeline') +vi.mock('../DraggableSidebar') vi.mock('../../../../feature-flags/selectors') vi.mock('../../../../file-data/selectors') vi.mock('../../../../organisms/Alerts') @@ -65,7 +67,9 @@ describe('ProtocolSteps', () => { timeline: [], errors: [], }) - // vi.mocked(TimelineToolbox).mockReturnValue(
mock TimelineToolbox
) + vi.mocked(DraggableSidebar).mockReturnValue( +
mock DraggableSidebar
+ ) vi.mocked(DeckSetupContainer).mockReturnValue(
mock DeckSetupContainer
) @@ -85,7 +89,7 @@ describe('ProtocolSteps', () => { it('renders each component in ProtocolSteps', () => { render() - // screen.getByText('mock TimelineToolbox') + screen.getByText('mock DraggableSidebar') screen.getByText('mock DeckSetupContainer') })