Index: shared/scripts/configuration/config.py =================================================================== diff -u -r1fec37fb75e89566710219a770a8219ab33de5bd -rf92b275542e472a43c421d87dffb76af9dd49b26 --- shared/scripts/configuration/config.py (.../config.py) (revision 1fec37fb75e89566710219a770a8219ab33de5bd) +++ shared/scripts/configuration/config.py (.../config.py) (revision f92b275542e472a43c421d87dffb76af9dd49b26) @@ -58,7 +58,9 @@ PRIMING_TITLE = "Priming" SYSTEM_SELF_TEST_TITLE = "System Self Test" FILTER_FLUSH_TITLE = "Filter Flush" -MAXIMUM_COUNTDOWN_TIME = 300 +TIME_OUT_DURATION_300 = 300 +TIME_OUT_DURATION_200 = 200 +TIME_OUT_DURATION_100 = 100 COUNT_DOWN_TIME_100 = 100 MINIMUM_COUNTDOWN_TIME = 0 ENABLED = True 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() Index: tst_pre_treatment_priming/test.py =================================================================== diff -u -r59988a4c04f638c31de18016380de912a95a1527 -rf92b275542e472a43c421d87dffb76af9dd49b26 --- tst_pre_treatment_priming/test.py (.../test.py) (revision 59988a4c04f638c31de18016380de912a95a1527) +++ tst_pre_treatment_priming/test.py (.../test.py) (revision f92b275542e472a43c421d87dffb76af9dd49b26) @@ -20,6 +20,8 @@ from dialin.common.hd_defs import PreTreatmentSubModes from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator +from configuration.config import TIME_OUT_DURATION_100, TIME_OUT_DURATION_200,\ + TIME_OUT_DURATION_300 hd_simulator = HDSimulator() @@ -280,13 +282,19 @@ test.startSection("Verifying 'Self Dry Test' screen") navigate_self_test_dry_screen() - utility.verify_countdown(config.BEGIN_PRIME_TITLE) + snooze(2) + utility.verify_countdown(config.BEGIN_PRIME_TITLE, TIME_OUT_DURATION_100) + utility.verify_countdown(config.BEGIN_PRIME_TITLE, TIME_OUT_DURATION_200) + utility.verify_countdown(config.BEGIN_PRIME_TITLE, TIME_OUT_DURATION_300) verify_dry_states() test.endSection() test.startSection("Verifying 'Priming' screen") navigate_to_priming_screen() - utility.verify_countdown(config.PRIMING_TITLE) + snooze(2) + utility.verify_countdown(config.PRIMING_TITLE, TIME_OUT_DURATION_100) + utility.verify_countdown(config.PRIMING_TITLE, TIME_OUT_DURATION_200) + utility.verify_countdown(config.PRIMING_TITLE, TIME_OUT_DURATION_300) verify_priming_states() verify_priming_recirculate_states() test.endSection()