Index: tst_rinseback_setup/test.py =================================================================== diff -u -r2961accdbc24fa832a3c6fa3f12fa52ce7938124 -r652f22280b507addf7233e3ec60e4271f88a6ec9 --- tst_rinseback_setup/test.py (.../test.py) (revision 2961accdbc24fa832a3c6fa3f12fa52ce7938124) +++ tst_rinseback_setup/test.py (.../test.py) (revision 652f22280b507addf7233e3ec60e4271f88a6ec9) @@ -28,20 +28,23 @@ dg_simulator = DGSimulator() hd_simulator = HDSimulator() + SCREEN_OBJ1 = names.o_EndTreatmentRinsebackStack_EndTreatmentRinsebackInit_EndTreatmentRinsebackInit rightarrow_obj_names = [names.o_EndTreatmentRinsebackInit_rightImage_Image] leftarrow_obj_names = [names.o_EndTreatmentRinsebackInit_leftImage_Image] container_run_state = names.o_EndTreatmentRinsebackStack_EndTreatmentRinseback_EndTreatmentRinseback container_additional_state = names.o_EndTreatmentRinsebackStack_EndTreatmentAdditional_EndTreatmentBase -count_down_value = 121 + +count_down_value = 151 #Should be in capitals count_down_default_value = 0 timer_default_value = 1 num_of_instructions = 3 def set_custom_object_property_rinseback_ml(text,container): """ - Method to set object property based on text - @param text : (string) treatment parameter text + Method to set object property based on text + @param text : (str) treatment parameter text + @return : rinseback volume object """ names.o_text_volume_rinseback_state["text"] = text names.o_text_volume_rinseback_state["container"] = container @@ -64,7 +67,7 @@ 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 = utility.convert_seconds_into_min_and_sec(num, time_format="%M") sec = utility.convert_seconds_into_min_and_sec(num, time_format="%S") - 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_minute_Text).text),str(sec),"Verifying seconds appearing on UI")# log need to be changed test.compare(str(waitForObject(names.o_EndTreatmentRinsebackInit_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") test.endSection() @@ -88,13 +91,13 @@ 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) + 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) - test.compare(str(waitForObject(rinseback_ml).text),str(num)+config.RINSEBACK_UNIT, "Verifying values apeearing on Progress circle") + test.compare(str(waitForObject(rinseback_ml).text),str(num)+config.RINSEBACK_UNIT, "Verifying values apeearing on Progress circle")#log need to be channged rinseback_ml_min = set_custom_object_property_rinseback_ml((str(num)+config.RINSEBACK_UNIT_MIN),container_run_state) 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.compare(str(waitForObject(rinseback_ml_min).text),str(num)+config.RINSEBACK_UNIT_MIN, "Verifying values apeearing on Lable")#log need to be changed + test.compare(str(waitForObject(names.o_EndTreatmentRinseback_circle_ProgressCircle).value),str(num), "Verifying Progress bar values")#log need to be changed test.endSection() test.compare(str(waitForObject(names.o_EndTreatmentRinseback_Rinseback_Text).text),config.RINSEBACK_TEXT, "Rinseback text must be {}".format(config.RINSEBACK_TEXT)) @@ -153,7 +156,7 @@ 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 = utility.convert_seconds_into_min_and_sec(num, time_format="%M") sec = utility.convert_seconds_into_min_and_sec(num, time_format="%S") - 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_minute_Text).text),str(sec), "Vrifying seconds apeearing on UI")#log must be changes test.compare(str(waitForObject(names.o_EndTreatmentRinsebackComplete_TimeText_hour_Text).text),str(min), "Vrifying minutes apeearing on UI") test.endSection() @@ -180,7 +183,7 @@ 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) - test.compare(str(waitForObject(rinseback_additional_ml).text),str(num)+config.RINSEBACK_UNIT_MIN, "Verifying values apeearing on Progres bar") + test.compare(str(waitForObject(rinseback_additional_ml).text),str(num)+config.RINSEBACK_UNIT_MIN, "Verifying values apeearing on Progres bar")#log must be changed rinseback_additional_ml_min = set_custom_object_property_rinseback_ml((str(num)+config.RINSEBACK_UNIT),container_additional_state) 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") @@ -240,6 +243,8 @@ verify_rinseback_paused_state_screen() verify_rinseback_stop_state_screen() verify_rinseback_run_additional_state_screen() + + utils.tstDone() \ No newline at end of file