@@ -77,27 +77,27 @@ describe('SetupRobotCalibration', () => {
77
77
} )
78
78
79
79
it ( 'renders deck, pipette, and tip length calibration components' , ( ) => {
80
- render ( ) [ 0 ]
80
+ render ( )
81
81
screen . getByText ( 'Mock SetupDeckCalibration' )
82
82
screen . getByText ( 'Mock SetupInstrumentCalibration' )
83
83
screen . getByText ( 'Mock SetupTipLengthCalibration' )
84
84
} )
85
85
86
86
it ( 'renders only pipette calibration component for Flex' , ( ) => {
87
87
when ( vi . mocked ( useIsFlex ) ) . calledWith ( ROBOT_NAME ) . thenReturn ( true )
88
- render ( ) [ 0 ]
88
+ render ( )
89
89
expect ( screen . queryByText ( 'Mock SetupDeckCalibration' ) ) . toBeNull ( )
90
90
screen . getByText ( 'Mock SetupInstrumentCalibration' )
91
91
expect ( screen . queryByText ( 'Mock SetupTipLengthCalibration' ) ) . toBeNull ( )
92
92
} )
93
93
94
94
it ( 'changes Proceed CTA copy based on next step' , ( ) => {
95
- render ( { nextStep : 'labware_setup_step' } ) [ 0 ]
95
+ render ( { nextStep : 'labware_setup_step' } )
96
96
screen . getByRole ( 'button' , { name : 'Proceed to labware' } )
97
97
} )
98
98
99
99
it ( 'calls the expandStep function and tracks the analytics event on click' , ( ) => {
100
- render ( ) [ 0 ]
100
+ render ( )
101
101
fireEvent . click ( screen . getByRole ( 'button' , { name : 'Proceed to modules' } ) )
102
102
expect ( mockExpandStep ) . toHaveBeenCalled ( )
103
103
expect ( mockTrackEvent ) . toHaveBeenCalledWith ( {
@@ -107,7 +107,7 @@ describe('SetupRobotCalibration', () => {
107
107
} )
108
108
109
109
it ( 'does not call the expandStep function on click if calibration is not complete' , ( ) => {
110
- render ( { calibrationStatus : { complete : false } } ) [ 0 ]
110
+ render ( { calibrationStatus : { complete : false } } )
111
111
const button = screen . getByRole ( 'button' , { name : 'Proceed to modules' } )
112
112
expect ( button ) . toBeDisabled ( )
113
113
fireEvent . click ( button )
@@ -116,7 +116,7 @@ describe('SetupRobotCalibration', () => {
116
116
117
117
it ( 'does not call the expandStep function on click if run has started' , ( ) => {
118
118
when ( vi . mocked ( useRunHasStarted ) ) . calledWith ( RUN_ID ) . thenReturn ( true )
119
- render ( ) [ 0 ]
119
+ render ( )
120
120
const button = screen . getByRole ( 'button' , { name : 'Proceed to modules' } )
121
121
expect ( button ) . toBeDisabled ( )
122
122
fireEvent . click ( button )
0 commit comments