Index: tst_time_duration/test.py =================================================================== diff -u -r8db9a04a6e9964f69b0fd1b079328a0cc60a6a73 -rdfbfb692b941ab983d31fc9a735a82bb0b18adf8 --- tst_time_duration/test.py (.../test.py) (revision 8db9a04a6e9964f69b0fd1b079328a0cc60a6a73) +++ tst_time_duration/test.py (.../test.py) (revision dfbfb692b941ab983d31fc9a735a82bb0b18adf8) @@ -77,26 +77,25 @@ else: totaltime_list.append(id) id_count += 1 - test.log("Selected time are {}".format(totaltime_list)) + test.log(str(totaltime_list)) return totaltime_list def verify_pop_up(): test.log("Pop up of time duration") mouseClick(waitForObject(names.o_treatmentHome_Time_Remaining_Text)) #FIXME: If we not use specified value then it will take minimum one and maximum 8 hours. #treatment_time_verification(60) - start_treatment_time_verification(300) - for duration in range(301): - hd_simulator.cmd_set_treatment_parameter_ranges(min_treatment_duration = duration, max_treatment_duration = 301, + start_treatment_time_verification(60) + for duration in range(60): + hd_simulator.cmd_set_treatment_parameter_ranges(min_treatment_duration = duration, max_treatment_duration = 60, min_uf_volume = 0.0, max_uf_volume = 0.0, min_dialysate_flow_rate = 0, max_dialysate_flow_rate = 0) waitForGUI(0.1) + hd_simulator.cmd_send_treatment_adjust_duration_response(True, 0, 100, 60) test.verify(waitForObjectExists(names.o_confirm_button).enabled, "'Confirm' button should be enabled") mouseClick(waitForObjectExists(names.o_confirm_button)) test.log("Confirm button is clicked") - mouseClick(waitForObjectExists(names.o_pop_up_close_button)) - test.log("Pop up of time duration is verified and closed") def main(): utils.tstStart(__file__) @@ -106,33 +105,26 @@ hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) - - - #Calculating total seconds into minutes and passing to treatment time verification -# total_time_list = total_time() -# for value in total_time_list: -# treatment_time_verification(value) -# -# #Give treatment stop response to pause remain time -# hd_simulator.cmd_set_treatment_states_data(sub_mode= 0, uf_state= 0, saline_state=0, heparin_state= 0, -# rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, -# treatment_end_state=0, treatment_stop_state=1, dialysis_state=0) -# #verify treatment pause state -# verify_pause_treatment_text() -# -# #Send treatment start response after pause state -# hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, -# rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, -# treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) -# - + snooze(3) + verify_pop_up() + #Calculating total seconds into minutes and passing to treatment time verification + total_time_list = total_time() + for value in total_time_list: + treatment_time_verification(value*60) + + #Give treatment stop response to pause remain time + hd_simulator.cmd_set_treatment_states_data(sub_mode= 0, uf_state= 0, saline_state=0, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state=1, dialysis_state=0) + #verify treatment pause state + verify_pause_treatment_text() + + #Send treatment start response after pause state + hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0) - verify_pop_up() - - - - utils.tstDone() - - \ No newline at end of file + + \ No newline at end of file