@@ -97,10 +97,9 @@ import { useNotifyRunQuery } from '../../../../resources/runs/useNotifyRunQuery'
97
97
98
98
import type { UseQueryResult } from 'react-query'
99
99
import type * as ReactRouterDom from 'react-router-dom'
100
- import type { Run } from '@opentrons/api-client'
101
- import type { CompletedProtocolAnalysis } from '@opentrons/shared-data'
102
100
import type * as OpentronsSharedData from '@opentrons/shared-data'
103
101
import type * as OpentronsComponents from '@opentrons/components'
102
+ import type * as OpentronsApiClient from '@opentrons/api-client'
104
103
105
104
const mockPush = vi . fn ( )
106
105
@@ -124,8 +123,6 @@ vi.mock('@opentrons/shared-data', async importOriginal => {
124
123
const actual = await importOriginal < typeof OpentronsSharedData > ( )
125
124
return {
126
125
...actual ,
127
- getAllPipetteNames : vi . fn ( ) ,
128
- getPipetteNameSpecs : vi . fn ( ) ,
129
126
getPipetteModelSpecs : vi . fn ( ) ,
130
127
}
131
128
} )
@@ -166,7 +163,7 @@ const mockSettings = {
166
163
}
167
164
const MOCK_ROTOCOL_LIQUID_KEY = { liquids : [ ] }
168
165
169
- const simpleV6Protocol = ( _uncastedSimpleV6Protocol as unknown ) as CompletedProtocolAnalysis
166
+ const simpleV6Protocol = ( _uncastedSimpleV6Protocol as unknown ) as OpentronsSharedData . CompletedProtocolAnalysis
170
167
171
168
const PROTOCOL_DETAILS = {
172
169
displayName : PROTOCOL_NAME ,
@@ -301,7 +298,7 @@ describe('ProtocolRunHeader', () => {
301
298
. calledWith ( RUN_ID , { staleTime : Infinity } )
302
299
. thenReturn ( {
303
300
data : { data : mockIdleUnstartedRun } ,
304
- } as UseQueryResult < Run > )
301
+ } as UseQueryResult < OpentronsApiClient . Run > )
305
302
when ( vi . mocked ( useProtocolDetailsForRun ) )
306
303
. calledWith ( RUN_ID )
307
304
. thenReturn ( PROTOCOL_DETAILS )
@@ -343,8 +340,8 @@ describe('ProtocolRunHeader', () => {
343
340
...MOCK_ROTOCOL_LIQUID_KEY ,
344
341
} as any )
345
342
vi . mocked ( useDeckConfigurationCompatibility ) . mockReturnValue ( [ ] )
346
- when ( vi . mocked ( getIsFixtureMismatch ) ) . thenReturn ( false )
347
- when ( vi . mocked ( useMostRecentRunId ) ) . thenReturn ( RUN_ID )
343
+ vi . mocked ( getIsFixtureMismatch ) . mockReturnValue ( false )
344
+ vi . mocked ( useMostRecentRunId ) . mockReturnValue ( RUN_ID )
348
345
} )
349
346
350
347
afterEach ( ( ) => {
@@ -431,7 +428,7 @@ describe('ProtocolRunHeader', () => {
431
428
. calledWith ( RUN_ID )
432
429
. thenReturn ( {
433
430
data : { data : { ...mockIdleUnstartedRun , current : true } } ,
434
- } as UseQueryResult < Run > )
431
+ } as UseQueryResult < OpentronsApiClient . Run > )
435
432
render ( )
436
433
expect ( mockCloseCurrentRun ) . toBeCalled ( )
437
434
expect ( mockTrackProtocolRunEvent ) . toBeCalled ( )
@@ -505,7 +502,7 @@ describe('ProtocolRunHeader', () => {
505
502
. calledWith ( RUN_ID )
506
503
. thenReturn ( {
507
504
data : { data : mockRunningRun } ,
508
- } as UseQueryResult < Run > )
505
+ } as UseQueryResult < OpentronsApiClient . Run > )
509
506
when ( vi . mocked ( useRunStatus ) )
510
507
. calledWith ( RUN_ID )
511
508
. thenReturn ( RUN_STATUS_RUNNING )
@@ -526,7 +523,7 @@ describe('ProtocolRunHeader', () => {
526
523
. calledWith ( RUN_ID )
527
524
. thenReturn ( {
528
525
data : { data : mockRunningRun } ,
529
- } as UseQueryResult < Run > )
526
+ } as UseQueryResult < OpentronsApiClient . Run > )
530
527
when ( vi . mocked ( useRunStatus ) )
531
528
. calledWith ( RUN_ID )
532
529
. thenReturn ( RUN_STATUS_RUNNING )
@@ -543,7 +540,7 @@ describe('ProtocolRunHeader', () => {
543
540
. calledWith ( RUN_ID )
544
541
. thenReturn ( {
545
542
data : { data : mockPausedRun } ,
546
- } as UseQueryResult < Run > )
543
+ } as UseQueryResult < OpentronsApiClient . Run > )
547
544
when ( vi . mocked ( useRunStatus ) )
548
545
. calledWith ( RUN_ID )
549
546
. thenReturn ( RUN_STATUS_PAUSED )
@@ -565,7 +562,7 @@ describe('ProtocolRunHeader', () => {
565
562
. calledWith ( RUN_ID )
566
563
. thenReturn ( {
567
564
data : { data : mockPauseRequestedRun } ,
568
- } as UseQueryResult < Run > )
565
+ } as UseQueryResult < OpentronsApiClient . Run > )
569
566
when ( vi . mocked ( useRunStatus ) )
570
567
. calledWith ( RUN_ID )
571
568
. thenReturn ( RUN_STATUS_PAUSE_REQUESTED )
@@ -583,7 +580,7 @@ describe('ProtocolRunHeader', () => {
583
580
. calledWith ( RUN_ID )
584
581
. thenReturn ( {
585
582
data : { data : mockStopRequestedRun } ,
586
- } as UseQueryResult < Run > )
583
+ } as UseQueryResult < OpentronsApiClient . Run > )
587
584
when ( vi . mocked ( useRunStatus ) )
588
585
. calledWith ( RUN_ID )
589
586
. thenReturn ( RUN_STATUS_STOP_REQUESTED )
@@ -600,7 +597,7 @@ describe('ProtocolRunHeader', () => {
600
597
. calledWith ( RUN_ID )
601
598
. thenReturn ( {
602
599
data : { data : mockRunningRun } ,
603
- } as UseQueryResult < Run > )
600
+ } as UseQueryResult < OpentronsApiClient . Run > )
604
601
when ( vi . mocked ( useRunStatus ) )
605
602
. calledWith ( RUN_ID )
606
603
. thenReturn ( RUN_STATUS_BLOCKED_BY_OPEN_DOOR )
@@ -622,7 +619,7 @@ describe('ProtocolRunHeader', () => {
622
619
. calledWith ( RUN_ID )
623
620
. thenReturn ( {
624
621
data : { data : mockStoppedRun } ,
625
- } as UseQueryResult < Run > )
622
+ } as UseQueryResult < OpentronsApiClient . Run > )
626
623
when ( vi . mocked ( useRunStatus ) )
627
624
. calledWith ( RUN_ID )
628
625
. thenReturn ( RUN_STATUS_STOPPED )
@@ -649,7 +646,7 @@ describe('ProtocolRunHeader', () => {
649
646
. calledWith ( RUN_ID )
650
647
. thenReturn ( {
651
648
data : { data : mockFailedRun } ,
652
- } as UseQueryResult < Run > )
649
+ } as UseQueryResult < OpentronsApiClient . Run > )
653
650
when ( vi . mocked ( useRunStatus ) )
654
651
. calledWith ( RUN_ID )
655
652
. thenReturn ( RUN_STATUS_FAILED )
@@ -676,7 +673,7 @@ describe('ProtocolRunHeader', () => {
676
673
. calledWith ( RUN_ID )
677
674
. thenReturn ( {
678
675
data : { data : mockSucceededRun } ,
679
- } as UseQueryResult < Run > )
676
+ } as UseQueryResult < OpentronsApiClient . Run > )
680
677
when ( vi . mocked ( useRunStatus ) )
681
678
. calledWith ( RUN_ID )
682
679
. thenReturn ( RUN_STATUS_SUCCEEDED )
@@ -707,7 +704,7 @@ describe('ProtocolRunHeader', () => {
707
704
. calledWith ( RUN_ID )
708
705
. thenReturn ( {
709
706
data : { data : mockSucceededRun } ,
710
- } as UseQueryResult < Run > )
707
+ } as UseQueryResult < OpentronsApiClient . Run > )
711
708
when ( vi . mocked ( useRunStatus ) )
712
709
. calledWith ( RUN_ID )
713
710
. thenReturn ( RUN_STATUS_SUCCEEDED )
@@ -742,7 +739,7 @@ describe('ProtocolRunHeader', () => {
742
739
. calledWith ( RUN_ID )
743
740
. thenReturn ( {
744
741
data : { data : mockFailedRun } ,
745
- } as UseQueryResult < Run > )
742
+ } as UseQueryResult < OpentronsApiClient . Run > )
746
743
when ( vi . mocked ( useRunStatus ) )
747
744
. calledWith ( RUN_ID )
748
745
. thenReturn ( RUN_STATUS_FAILED )
@@ -758,7 +755,7 @@ describe('ProtocolRunHeader', () => {
758
755
. calledWith ( RUN_ID )
759
756
. thenReturn ( {
760
757
data : { data : mockFailedRun } ,
761
- } as UseQueryResult < Run > )
758
+ } as UseQueryResult < OpentronsApiClient . Run > )
762
759
when ( vi . mocked ( useRunStatus ) )
763
760
. calledWith ( RUN_ID )
764
761
. thenReturn ( RUN_STATUS_FAILED )
@@ -794,7 +791,7 @@ describe('ProtocolRunHeader', () => {
794
791
. calledWith ( RUN_ID )
795
792
. thenReturn ( {
796
793
data : { data : mockSucceededRun } ,
797
- } as UseQueryResult < Run > )
794
+ } as UseQueryResult < OpentronsApiClient . Run > )
798
795
when ( vi . mocked ( useRunStatus ) )
799
796
. calledWith ( RUN_ID )
800
797
. thenReturn ( RUN_STATUS_SUCCEEDED )
@@ -908,7 +905,7 @@ describe('ProtocolRunHeader', () => {
908
905
. calledWith ( RUN_ID )
909
906
. thenReturn ( {
910
907
data : { data : mockSucceededRun } ,
911
- } as UseQueryResult < Run > )
908
+ } as UseQueryResult < OpentronsApiClient . Run > )
912
909
when ( vi . mocked ( useRunStatus ) )
913
910
. calledWith ( RUN_ID )
914
911
. thenReturn ( RUN_STATUS_SUCCEEDED )
@@ -965,7 +962,7 @@ describe('ProtocolRunHeader', () => {
965
962
status : RUN_STATUS_SUCCEEDED ,
966
963
} ,
967
964
} ,
968
- } as UseQueryResult < Run > )
965
+ } as UseQueryResult < OpentronsApiClient . Run > )
969
966
when ( vi . mocked ( useRunStatus ) )
970
967
. calledWith ( RUN_ID )
971
968
. thenReturn ( RUN_STATUS_SUCCEEDED )
@@ -987,7 +984,7 @@ describe('ProtocolRunHeader', () => {
987
984
status : RUN_STATUS_IDLE ,
988
985
} ,
989
986
} ,
990
- } as UseQueryResult < Run > )
987
+ } as UseQueryResult < OpentronsApiClient . Run > )
991
988
when ( vi . mocked ( useRunStatus ) ) . calledWith ( RUN_ID ) . thenReturn ( RUN_STATUS_IDLE )
992
989
993
990
render ( )
0 commit comments