Index: tst_rinseback_setup/test.py =================================================================== diff -u -rcc958d5ac22e0069e0d27b0de6255a37d5399a76 -r83caf575cae31050f77bd25d2bb86f380c2338c8 --- tst_rinseback_setup/test.py (.../test.py) (revision cc958d5ac22e0069e0d27b0de6255a37d5399a76) +++ tst_rinseback_setup/test.py (.../test.py) (revision 83caf575cae31050f77bd25d2bb86f380c2338c8) @@ -82,11 +82,14 @@ rinseback_state= TreatmentRinsebackStates.RINSEBACK_STOP_INIT_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + + test.startSection("verifying count down value of timer") for num in range(timer_default_value,count_down_value): - hd_simulator.cmd_send_treatment_rinseback_data(target_vol= float(0), current_vol= float(0), flow_rate= 0, timeout= num,timeout_countdown= num, is_completed= 0) + hd_simulator.cmd_send_treatment_rinseback_data(target_vol= count_down_default_value, current_vol= count_down_default_value, flow_rate= count_down_default_value, timeout= num,timeout_countdown= num, is_completed= 0) min,sec = utility.convert_seconds_into_min_and_sec(num) - test.compare(str(waitForObject(names.o_EndTreatmentRinsebackInit_TimeText_minute_Text).text),str(sec),"Vrifying seconds apeearing on UI") - test.compare(str(waitForObject(names.o_EndTreatmentRinsebackInit_TimeText_hour_Text).text),str(min),"Verifying minutes apeearing on UI") + test.compare(str(waitForObject(names.o_EndTreatmentRinsebackInit_TimeText_minute_Text).text),str(sec),"Verifying seconds appearing on UI") + test.compare(str(waitForObject(names.o_EndTreatmentRinsebackInit_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") + test.endSection() test.compare(str(waitForObject(names.o_rinse_back_text).text),config.RINSE_BACK_SETUP_TEXT, "Rinseback Setup text must be {}".format(config.RINSE_BACK_SETUP_TEXT)) test.verify(waitForObjectExists(names.o_rinse_back_text).enabled, " Start Rinseback button must be active") @@ -106,6 +109,7 @@ saline_state = TreatmentStates.TREATMENT_START_STATE.value, heparin_state = TreatmentStates.TREATMENT_START_STATE.value,rinseback_state= TreatmentRinsebackStates.RINSEBACK_RUN_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + test.startSection("verifying count down value of timer") for num in range(count_down_default_value,count_down_value): hd_simulator.cmd_send_treatment_rinseback_data(target_vol= count_down_value, current_vol= num, flow_rate= num, timeout= count_down_default_value,timeout_countdown= count_down_default_value, is_completed= 0) rinseback_ml = set_custom_object_property_rinseback_ml((str(num)+config.RINSEBACK_UNIT),container_run_state) @@ -114,7 +118,7 @@ test.verify(waitForObjectExists(names.o_EndTreatmentRinseback_circle_Circle).enabled, "Progress bar must be enable") test.compare(str(waitForObject(rinseback_ml_min).text),str(num)+config.RINSEBACK_UNIT_MIN, "Verifying values apeearing on Lable") test.compare(str(waitForObject(names.o_EndTreatmentRinseback_circle_ProgressCircle).value),str(num), "Verifying Progress bar values") - + test.endSection() test.compare(str(waitForObject(names.o_EndTreatmentRinseback_Rinseback_Text).text),config.RINSEBACK_TEXT, "Rinseback text must be {}".format(config.RINSEBACK_TEXT)) test.compare(str(waitForObject(names.o_EndTreatmentRinseback_imageEnd_ImageText).text),config.END_IMAGE_BUTTON_TEXT, "END button text must be {}".format(config.END_IMAGE_BUTTON_TEXT)) @@ -167,11 +171,14 @@ hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_STATE.value , uf_state = TreatmentStates.TREATMENT_START_STATE.value, saline_state = TreatmentStates.TREATMENT_START_STATE.value, heparin_state = TreatmentStates.TREATMENT_START_STATE.value,rinseback_state= TreatmentRinsebackStates.RINSEBACK_STOP_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + test.startSection("verifying count down value of timer") for num in range(timer_default_value,count_down_value): hd_simulator.cmd_send_treatment_rinseback_data(target_vol= count_down_value, current_vol= count_down_default_value, flow_rate= count_down_default_value, timeout= num,timeout_countdown= num, is_completed= 0) min,sec = utility.convert_seconds_into_min_and_sec(num) test.compare(str(waitForObject(names.o_EndTreatmentRinsebackComplete_TimeText_minute_Text).text),str(sec), "Vrifying seconds apeearing on UI") test.compare(str(waitForObject(names.o_EndTreatmentRinsebackComplete_TimeText_hour_Text).text),str(min), "Vrifying minutes apeearing on UI") + test.endSection() + test.compare(str(waitForObject(names.o_EndTreatmentRinsebackComplete_Rinseback_Complete_Text).text),config.RINSEBACK_COMPLETE_TEXT, "Rinseback Complete text must be {}".format(config.RINSEBACK_COMPLETE_TEXT)) test.compare(str(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_END_TREATMENT_Text).text), config.END_TREATMENT_BUTTON_TEXT, "END TREATMENT button text must be {}".format(config.END_TREATMENT_BUTTON_TEXT)) test.verify(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_END_TREATMENT_Text).enabled, "END TREATMENT button must be active") @@ -191,6 +198,7 @@ hd_simulator.cmd_set_treatment_states_data(sub_mode = TreatmentStates.TREATMENT_RINSEBACK_STATE.value , uf_state = TreatmentStates.TREATMENT_START_STATE.value, saline_state = TreatmentStates.TREATMENT_START_STATE.value, heparin_state = TreatmentStates.TREATMENT_START_STATE.value,rinseback_state= TreatmentRinsebackStates.RINSEBACK_RUN_ADDITIONAL_STATE.value, recirculate_state = TreatmentStates.TREATMENT_START_STATE.value, blood_prime_state = TreatmentStates.TREATMENT_START_STATE.value,treatment_end_state = TreatmentEndStates.TREATMENT_END_PAUSED_STATE.value, treatment_stop_state = TreatmentStates.TREATMENT_START_STATE.value, dialysis_state = TreatmentStates.TREATMENT_START_STATE.value) + test.startSection("verifying count down value of timer") for num in range(count_down_default_value,count_down_value): hd_simulator.cmd_send_treatment_rinseback_data(target_vol= count_down_value, current_vol= num, flow_rate= num, timeout= count_down_default_value,timeout_countdown= count_down_default_value, is_completed= 0) rinseback_additional_ml = set_custom_object_property_rinseback_ml((str(num)+config.RINSEBACK_UNIT_MIN),container_additional_state) @@ -199,6 +207,8 @@ test.compare(str(waitForObject(rinseback_additional_ml_min).text),str(num)+config.RINSEBACK_UNIT, "Verifying values apeearing on Lable") test.verify(waitForObjectExists(names.o_EndTreatmentAdditional_circle_Circle).enabled, "Progress Bar must be enable") test.compare(str(waitForObject(names.o_EndTreatmentAdditional_circle_ProgressCircle).value),str(num), "Verifying Progress bar values") + test.endSection() + test.compare(str(waitForObject(names.o_EndTreatmentAdditional_Additional_Rinseback_Text).text),config.ADDITIONAL_RINSEBACK_TEXT, "Additional Rinseback text must be {}".format(config.ADDITIONAL_RINSEBACK_TEXT)) test.endSection() @@ -240,7 +250,7 @@ for reason_id in range(1, config.NUM_OF_REQUEST_REJECT_REASONS + 1): hd_simulator.cmd_send_treatment_adjust_rinseback_response(accepted = 0, reason= reason_id) rejection_message = waitForObjectExists(utility.rejection_msg(text=config.REJECTION_REASON[reason_id])) - test.compare(rejection_message.text, config.REJECTION_REASON[reason_id], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[reason_id])) + test.compare(rejection_message.text, config.REJECTION_REASON[reason_id], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[reason_id])) test.endSection() def main():