@@ -158,53 +158,60 @@ async def test_TC_RVCOPSTATE_2_1(self):
158
158
asserts .assert_true (operational_state in defined_states or in_range , "OperationalState has an invalid ID value!" )
159
159
160
160
if self .check_pics ("RVCOPSTATE.S.M.ST_STOPPED" ):
161
- self .print_step ("6a" , "Manually put the device in the stopped state" )
161
+ test_step = "Manually put the device in the stopped state"
162
+ self .print_step ("6a" , test_step )
162
163
if not self .is_ci :
163
- input ( "Press Enter when done.\n " )
164
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
164
165
await self .read_and_validate_opstate (step = "6b" , expected_state = Clusters .OperationalState .Enums .OperationalStateEnum .kStopped )
165
166
if self .check_pics ("RVCOPSTATE.S.M.ST_RUNNING" ):
166
- self .print_step ("6c" , "Manually put the device in the running state" )
167
+ test_step = "Manually put the device in the running state"
168
+ self .print_step ("6c" , test_step )
167
169
if self .is_ci :
168
170
await self .send_run_change_to_mode_cmd (1 )
169
171
else :
170
- input ( "Press Enter when done.\n " )
172
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
171
173
await self .read_and_validate_opstate (step = "6d" , expected_state = Clusters .OperationalState .Enums .OperationalStateEnum .kRunning )
172
174
if self .check_pics ("RVCOPSTATE.S.M.ST_PAUSED" ):
173
- self .print_step ("6e" , "Manually put the device in the paused state" )
175
+ test_step = "Manually put the device in the paused state"
176
+ self .print_step ("6e" , test_step )
174
177
if self .is_ci :
175
178
await self .send_pause_cmd ()
176
179
else :
177
- input ( "Press Enter when done.\n " )
180
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
178
181
await self .read_and_validate_opstate (step = "6f" , expected_state = Clusters .OperationalState .Enums .OperationalStateEnum .kPaused )
179
182
if self .check_pics ("RVCOPSTATE.S.M.ST_ERROR" ):
180
- self .print_step ("6g" , "Manually put the device in the error state" )
183
+ test_step = "Manually put the device in the error state"
184
+ self .print_step ("6g" , test_step )
181
185
if self .is_ci :
182
186
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}' )
183
187
else :
184
- input ( "Press Enter when done.\n " )
188
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
185
189
await self .read_and_validate_opstate (step = "6h" , expected_state = Clusters .OperationalState .Enums .OperationalStateEnum .kError )
186
190
if self .check_pics ("RVCOPSTATE.S.M.ST_SEEKING_CHARGER" ):
187
- self .print_step ("6i" , "Manually put the device in the seeking charger state" )
191
+ test_step = "Manually put the device in the seeking charger state"
192
+ self .print_step ("6i" , test_step )
188
193
if self .is_ci :
189
194
self .write_to_app_pipe ('{"Name": "Reset"}' )
190
195
await self .send_run_change_to_mode_cmd (1 )
191
196
await self .send_run_change_to_mode_cmd (0 )
192
197
else :
193
- input ( "Press Enter when done.\n " )
198
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
194
199
await self .read_and_validate_opstate (step = "6j" , expected_state = Clusters .RvcOperationalState .Enums .OperationalStateEnum .kSeekingCharger )
195
200
if self .check_pics ("RVCOPSTATE.S.M.ST_CHARGING" ):
196
- self .print_step ("6k" , "Manually put the device in the charging state" )
201
+ test_step = "Manually put the device in the charging state"
202
+ self .print_step ("6k" , test_step )
197
203
if self .is_ci :
198
204
self .write_to_app_pipe ('{"Name": "ChargerFound"}' )
199
205
else :
200
- input ( "Press Enter when done.\n " )
206
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
201
207
await self .read_and_validate_opstate (step = "6l" , expected_state = Clusters .RvcOperationalState .Enums .OperationalStateEnum .kCharging )
202
208
if self .check_pics ("RVCOPSTATE.S.M.ST_DOCKED" ):
203
- self .print_step ("6m" , "Manually put the device in the docked state" )
209
+ test_step = "Manually put the device in the docked state"
210
+ self .print_step ("6m" , test_step )
204
211
if self .is_ci :
205
212
self .write_to_app_pipe ('{"Name": "Charged"}' )
206
213
else :
207
- input ( "Press Enter when done.\n " )
214
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
208
215
await self .read_and_validate_opstate (step = "6n" , expected_state = Clusters .RvcOperationalState .Enums .OperationalStateEnum .kDocked )
209
216
210
217
if self .check_pics ("RVCOPSTATE.S.A0005" ):
@@ -226,86 +233,98 @@ async def test_TC_RVCOPSTATE_2_1(self):
226
233
asserts .assert_true (operational_error .errorStateLabel is not None , "ErrorStateLabel should be populated" )
227
234
228
235
if self .check_pics ("RVCOPSTATE.S.M.ERR_NO_ERROR" ):
229
- self .print_step ("7a" , "Manually put the device in the no error state" )
236
+ test_step = "Manually put the device in the no error state"
237
+ self .print_step ("7a" , test_step )
230
238
if not self .is_ci :
231
- input ( "Press Enter when done.\n " )
239
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
232
240
await self .read_and_validate_operror (step = "7b" , expected_error = Clusters .OperationalState .Enums .ErrorStateEnum .kNoError )
233
241
if self .check_pics ("RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME" ):
234
- self .print_step ("7c" , "Manually put the device in the unable to start or resume error state" )
242
+ test_step = "Manually put the device in the unable to start or resume error state"
243
+ self .print_step ("7c" , test_step )
235
244
if self .is_ci :
236
245
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}' )
237
246
else :
238
- input ( "Press Enter when done.\n " )
247
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
239
248
await self .read_and_validate_operror (step = "7d" , expected_error = Clusters .OperationalState .Enums .ErrorStateEnum .kUnableToStartOrResume )
240
249
if self .check_pics ("RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION" ):
241
- self .print_step ("7e" , "Manually put the device in the unable to complete operation error state" )
250
+ test_step = "Manually put the device in the unable to complete operation error state"
251
+ self .print_step ("7e" , test_step )
242
252
if self .is_ci :
243
253
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "UnableToCompleteOperation"}' )
244
254
else :
245
- input ( "Press Enter when done.\n " )
255
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
246
256
await self .read_and_validate_operror (step = "7f" , expected_error = Clusters .OperationalState .Enums .ErrorStateEnum .kUnableToCompleteOperation )
247
257
if self .check_pics ("RVCOPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE" ):
248
- self .print_step ("7g" , "Manually put the device in the command invalid error state" )
258
+ test_step = "Manually put the device in the command invalid error state"
259
+ self .print_step ("7g" , test_step )
249
260
if self .is_ci :
250
261
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "CommandInvalidInState"}' )
251
262
else :
252
- input ( "Press Enter when done.\n " )
263
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
253
264
await self .read_and_validate_operror (step = "7h" , expected_error = Clusters .OperationalState .Enums .ErrorStateEnum .kCommandInvalidInState )
254
265
if self .check_pics ("RVCOPSTATE.S.M.ERR_FAILED_TO_FIND_CHARGING_DOCK" ):
255
- self .print_step ("7i" , "Manually put the device in the failed to find dock error state" )
266
+ test_step = "Manually put the device in the failed to find dock error state"
267
+ self .print_step ("7i" , test_step )
256
268
if self .is_ci :
257
269
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "FailedToFindChargingDock"}' )
258
270
else :
259
- input ( "Press Enter when done.\n " )
271
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
260
272
await self .read_and_validate_operror (step = "7j" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kFailedToFindChargingDock )
261
273
if self .check_pics ("RVCOPSTATE.S.M.ERR_STUCK" ):
262
- self .print_step ("7k" , "Manually put the device in the stuck error state" )
274
+ test_step = "Manually put the device in the stuck error state"
275
+ self .print_step ("7k" , test_step )
263
276
if self .is_ci :
264
277
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "Stuck"}' )
265
278
else :
266
- input ( "Press Enter when done.\n " )
279
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
267
280
await self .read_and_validate_operror (step = "7l" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kStuck )
268
281
if self .check_pics ("RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING" ):
269
- self .print_step ("7m" , "Manually put the device in the dust bin missing error state" )
282
+ test_step = "Manually put the device in the dust bin missing error state"
283
+ self .print_step ("7m" , test_step )
270
284
if self .is_ci :
271
285
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "DustBinMissing"}' )
272
286
else :
273
- input ( "Press Enter when done.\n " )
287
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
274
288
await self .read_and_validate_operror (step = "7n" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kDustBinMissing )
275
289
if self .check_pics ("RVCOPSTATE.S.M.ERR_DUST_BIN_FULL" ):
276
- self .print_step ("7o" , "Manually put the device in the dust bin full error state" )
290
+ test_step = "Manually put the device in the dust bin full error state"
291
+ self .print_step ("7o" , test_step )
277
292
if self .is_ci :
278
293
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "DustBinFull"}' )
279
294
else :
280
- input ( "Press Enter when done.\n " )
295
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
281
296
await self .read_and_validate_operror (step = "7p" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kDustBinFull )
282
297
if self .check_pics ("RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY" ):
283
- self .print_step ("7q" , "Manually put the device in the water tank empty error state" )
298
+ test_step = "Manually put the device in the water tank empty error state"
299
+ self .print_step ("7q" , test_step )
284
300
if self .is_ci :
285
301
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "WaterTankEmpty"}' )
286
302
else :
287
- input ( "Press Enter when done.\n " )
303
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
288
304
await self .read_and_validate_operror (step = "7r" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kWaterTankEmpty )
289
305
if self .check_pics ("RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING" ):
290
- self .print_step ("7s" , "Manually put the device in the water tank missing error state" )
306
+ test_step = "Manually put the device in the water tank missing error state"
307
+ self .print_step ("7s" , test_step )
291
308
if self .is_ci :
292
309
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "WaterTankMissing"}' )
293
310
else :
294
- input ( "Press Enter when done.\n " )
311
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
295
312
await self .read_and_validate_operror (step = "7t" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kWaterTankMissing )
296
313
if self .check_pics ("RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN" ):
297
- self .print_step ("7u" , "Manually put the device in the water tank lid open error state" )
314
+ test_step = "Manually put the device in the water tank lid open error state"
315
+ self .print_step ("7u" , test_step )
298
316
if self .is_ci :
299
317
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "WaterTankLidOpen"}' )
300
318
else :
301
- input ( "Press Enter when done.\n " )
319
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
302
320
await self .read_and_validate_operror (step = "7v" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kWaterTankLidOpen )
303
321
if self .check_pics ("RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING" ):
304
- self .print_step ("7w" , "Manually put the device in the mop cleaning pad missing error state" )
322
+ test_step = "Manually put the device in the mop cleaning pad missing error state"
323
+ self .print_step ("7w" , test_step )
305
324
if self .is_ci :
306
325
self .write_to_app_pipe ('{"Name": "ErrorEvent", "Error": "MopCleaningPadMissing"}' )
307
326
else :
308
- input ( "Press Enter when done.\n " )
327
+ self . wait_for_user_input ( prompt_msg = f" { test_step } , and press Enter when done.\n " )
309
328
await self .read_and_validate_operror (step = "7x" , expected_error = Clusters .RvcOperationalState .Enums .ErrorStateEnum .kMopCleaningPadMissing )
310
329
311
330
0 commit comments