Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r1fec37fb75e89566710219a770a8219ab33de5bd -rf92b275542e472a43c421d87dffb76af9dd49b26 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 1fec37fb75e89566710219a770a8219ab33de5bd) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision f92b275542e472a43c421d87dffb76af9dd49b26) @@ -121,34 +121,36 @@ 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 + @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(300, 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(300, 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(300, 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(300, 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 @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: @@ -158,7 +160,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()