Index: tst_recirculate/test.py =================================================================== diff -u -r571936f8ececab602e4b5cecc030d2571d62f5a4 -r454470a94a58be24a6fcec1263ee4af64f51a2d5 --- tst_recirculate/test.py (.../test.py) (revision 571936f8ececab602e4b5cecc030d2571d62f5a4) +++ tst_recirculate/test.py (.../test.py) (revision 454470a94a58be24a6fcec1263ee4af64f51a2d5) @@ -31,29 +31,6 @@ timer_default_value = 1 num_of_instructions = 3 -def verify_bullet_navigation(num, num_of_instructions, screen_obj): - """ - Method to verify status of bullets based - on number of instruction screen - @param num - (int) number of indicator - @param num_of_instructions- (int) count the number of instructions - @param object - screen_obj - (str) Screen object - """ - test.startSection("instruction bullet verification for screens") - for instruction in range(1, num_of_instructions): - bullet_children = object.children(waitForObjectExists(utility.get_bullet_object(screen_obj,(0 + instruction) - 1))) - bullet_circle_color = bullet_children[0].color.name - bullet_border_color = bullet_children[0].border.color.name - if instruction <= num: - test.compare(bullet_circle_color, config.COMPLETE_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.log(str(instruction) + " Complete bullet") - else: - test.compare(bullet_circle_color, config.CURRENT_COLOR) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR) - test.log(str(instruction) + " Incomplete bullet") - test.endSection() - def verification_of_recirculate_recirculate_state(): """ Method to verify Treatment Recirculate Recirculate state screens @@ -67,7 +44,8 @@ test.startSection("Verifying Timer count down timer") for num in range(timer_default_value,count_down_value): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total = num, timeout_count_down = num) - min,sec = utility.convert_seconds_into_min_and_sec(num) + 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_EndTreatmentBase_TimeText_minute_Text).text),str(sec),"Verifying seconds appearing on UI") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") test.endSection() @@ -94,7 +72,8 @@ test.startSection("Verifying Timer count down timer") for num in range(timer_default_value,count_down_value): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total = num, timeout_count_down = num) - min,sec = utility.convert_seconds_into_min_and_sec(num) + 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_EndTreatmentBase_TimeText_minute_Text).text),str(sec),"Verifying seconds appearing on UI") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") test.endSection() @@ -111,7 +90,7 @@ test.startSection("verifying right arrow functionality for recirculate state Screen") utility.verify_missing_object(names.o_EndTreatmentBase_leftImage_Image) for indicator in range(1, num_of_instructions, 1): - verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + utility.verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) if indicator != num_of_instructions: mouseClick(waitForObject(names.o_EndTreatmentBase_rightImage_Image)) test.compare(str(waitForObjectExists(names.o_recirculate_text).text), config.RECIRCULATE_TEXT, "Recirculate text must be {}".format(config.RECIRCULATE_TEXT)) @@ -126,7 +105,7 @@ test.startSection("verifying left arrow functionality for recirculate state screens") utility.verify_missing_object(names.o_EndTreatmentBase_rightImage_Image) for indicator in range(num_of_instructions, 0, -1): - verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + utility.verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) if indicator != 1: mouseClick(waitForObject(names.o_EndTreatmentBase_leftImage_Image)) test.compare(str(waitForObjectExists(names.o_recirculate_text).text), config.RECIRCULATE_TEXT, "Recirculate text must be {}".format(config.RECIRCULATE_TEXT))