Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rcf40497c2339959f37aa2c078d71aceeb58f82f5 -r1360b54e0f3f64259e03e1b1700fcd04dec9d384 --- shared/scripts/configuration/utility.py (.../utility.py) (revision cf40497c2339959f37aa2c078d71aceeb58f82f5) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 1360b54e0f3f64259e03e1b1700fcd04dec9d384) @@ -107,32 +107,36 @@ time_text = progress_circle_children[1] return time_text.time -def verify_countdown(screen_title): +def verify_countdown(screen_title, time_out): """ - Method to verify the count down - time in application - @param screen_title - (str) current title of the screen + Method to verify the count down + time in application + @param screen_title - (str) current title of the screen + @param time_out - (int) time out duration in secs """ test.startSection("Verify the count down time in application") for count_down in range(COUNT_DOWN_TIME_100, MINIMUM_COUNTDOWN_TIME-1, -1): if screen_title == BEGIN_PRIME_TITLE: - hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(total=300, countdown=count_down) + hd_simulator.cmd_send_pre_treatment_self_test_dry_progress_data(time_out, count_down) elif screen_title == PRIMING_TITLE: - hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(timeout=300, countdown=count_down) + hd_simulator.cmd_send_pre_treatment_disposables_prime_progress_data(time_out, 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) + hd_simulator.cmd_send_pre_treatment_self_test_no_cartridge_progress_data(time_out, count_down) else: - dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(total=300, countdown=count_down) + dg_simulator.cmd_send_dg_pre_treatment_filter_flush_progress_data(time_out, 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)) - verify_the_progress(count_down, screen_title) + verify_the_progress(count_down, screen_title, time_out) test.endSection() - -def verify_the_progress(count_down, screen_title): + + +def verify_the_progress(count_down, screen_title, time_out): """ - Method to verify the current progress - @param count_down - (int) current count down time + Method to verify the current progress + @param count_down - (int) current count down time + @param screen_title - (str) current title of the screen + @param time_out - (int) time out duration in secs """ test.startSection("Verifying the current progress") if screen_title == BEGIN_PRIME_TITLE or screen_title == PRIMING_TITLE: @@ -142,7 +146,7 @@ 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 + expected_progress = time_out - count_down test.compare(current_progress, expected_progress, "{} should be the current progress".format(expected_progress)) test.endSection()