Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r262cc42e2b0a0044bc0c698249b0da502a31766f -r9b04cc323c54bbd0bdd8bd2dee62a154d375b401 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 262cc42e2b0a0044bc0c698249b0da502a31766f) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 9b04cc323c54bbd0bdd8bd2dee62a154d375b401) @@ -24,7 +24,6 @@ hd_simulator = HDSimulator() - def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container @@ -98,6 +97,7 @@ names.o_self_test_dry_check_list_text["text"] = text return names.o_self_test_dry_check_list_text + def get_time(screen_title): """ Method to return the current count down @@ -107,8 +107,10 @@ """ if screen_title == BEGIN_PRIME_TITLE or screen_title == PRIMING_TITLE: parent_object = object.parent(squish.waitForObjectExists(self_test_dry_check_list_text(screen_title))) + elif screen_title == SYSTEM_SELF_TEST_TITLE: + parent_object = object.parent(squish.waitForObjectExists(names.o_system_self_test)) else: - parent_object = object.parent(squish.waitForObjectExists(system_self_test(screen_title))) + parent_object = object.parent(squish.waitForObjectExists(names.o_PreTreatmentBase_Filter_Flush_Text)) time_parent_children = object.children(parent_object) progress_circle_parent = time_parent_children[4] progress_circle_parent = object.children(progress_circle_parent) @@ -127,13 +129,14 @@ """ test.startSection("Verify the count down time in application") for count_down in range(MAXIMUM_COUNTDOWN_TIME, MINIMUM_COUNTDOWN_TIME-1, -1): - test.log(str(count_down)) if screen_title == BEGIN_PRIME_TITLE: hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(total=300, countdown=count_down) elif screen_title == PRIMING_TITLE: hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout=300, countdown=count_down) elif screen_title == SYSTEM_SELF_TEST_TITLE: hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(total=300, countdown=count_down) + else: + dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(total=300, countdown=count_down) actual_time = get_time(screen_title) expected_time = convert_seconds_into_min_and_sec(count_down) test.compare(actual_time, expected_time, "Actual count down time: {} should be equal to expected count down time {}".format(actual_time, expected_time)) @@ -149,8 +152,10 @@ test.startSection("Verifying the current progress") if screen_title == BEGIN_PRIME_TITLE or screen_title == PRIMING_TITLE: current_progress = (squish.waitForObjectExists(names.o_self_test_dry_progress)).progressValue - else: + elif screen_title == SYSTEM_SELF_TEST_TITLE: current_progress = (squish.waitForObjectExists(names.o_system_self_test_progress)).progressValue + else: + current_progress = (squish.waitForObjectExists(names.o_filter_flush_progress)).progressValue #Since progress value is equal maximum count down value - current count down value expected_progress = MAXIMUM_COUNTDOWN_TIME - count_down test.compare(current_progress, expected_progress, "{} should be the current progress".format(expected_progress))