@@ -115,47 +115,51 @@ async def test_TC_RVCOPSTATE_2_4(self):
115
115
self .write_to_app_pipe ('{"Name": "Reset"}' )
116
116
117
117
if self .check_pics ("RVCOPSTATE.S.M.ST_ERROR" ):
118
- self .print_step (2 , "Manually put the device in the ERROR operational state" )
118
+ step_name = "Manually put the device in the ERROR operational state"
119
+ self .print_step (2 , step_name )
119
120
if self .is_ci :
120
121
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}' )
121
122
else :
122
- input ( "Press Enter when done. \n " )
123
+ self . wait_for_user_input ( step_name )
123
124
124
125
await self .read_operational_state_with_check (3 , op_states .kError )
125
126
126
127
await self .send_go_home_cmd_with_check (4 , op_errors .kCommandInvalidInState )
127
128
128
129
if self .check_pics ("RVCOPSTATE.S.M.ST_CHARGING" ):
129
- self .print_step (5 , "Manually put the device in the CHARGING operational state" )
130
+ step_name = "Manually put the device in the CHARGING operational state"
131
+ self .print_step (5 , step_name )
130
132
if self .is_ci :
131
133
self .write_to_app_pipe ('{"Name": "Reset"}' )
132
134
self .write_to_app_pipe ('{"Name": "Docked"}' )
133
135
self .write_to_app_pipe ('{"Name": "Charging"}' )
134
136
else :
135
- input ( "Press Enter when done. \n " )
137
+ self . wait_for_user_input ( step_name )
136
138
137
139
await self .read_operational_state_with_check (6 , rvc_op_states .kCharging )
138
140
139
141
await self .send_go_home_cmd_with_check (7 , op_errors .kCommandInvalidInState )
140
142
141
143
if self .check_pics ("RVCOPSTATE.S.M.ST_DOCKED" ):
142
- self .print_step (8 , "Manually put the device in the DOCKED operational state" )
144
+ step_name = "Manually put the device in the DOCKED operational state"
145
+ self .print_step (8 , step_name )
143
146
if self .is_ci :
144
147
self .write_to_app_pipe ('{"Name": "Charged"}' )
145
148
else :
146
- input ( "Press Enter when done. \n " )
149
+ self . wait_for_user_input ( step_name )
147
150
148
151
await self .read_operational_state_with_check (9 , rvc_op_states .kDocked )
149
152
150
153
await self .send_go_home_cmd_with_check (10 , op_errors .kCommandInvalidInState )
151
154
152
155
if self .check_pics ("PICS_M_ST_SEEKING_CHARGER" ):
153
- self .print_step (8 , "Manually put the device in the SEEKING CHARGER operational state" )
156
+ step_name = "Manually put the device in the SEEKING CHARGER operational state"
157
+ self .print_step (8 , step_name )
154
158
if self .is_ci :
155
159
await self .send_run_change_to_mode_cmd (rvc_app_run_mode_cleaning )
156
160
await self .send_run_change_to_mode_cmd (rvc_app_run_mode_idle )
157
161
else :
158
- input ( "Press Enter when done. \n " )
162
+ self . wait_for_user_input ( step_name )
159
163
160
164
await self .read_operational_state_with_check (9 , rvc_op_states .kSeekingCharger )
161
165
0 commit comments