Index: shared/scripts/configuration/config.py =================================================================== diff -u -rd518b54a0543fdb11fb4ebd9f9eb9dd4334232b1 -r3f9d21a04d25f785833fca1381c6f23d6364b39e --- shared/scripts/configuration/config.py (.../config.py) (revision d518b54a0543fdb11fb4ebd9f9eb9dd4334232b1) +++ shared/scripts/configuration/config.py (.../config.py) (revision 3f9d21a04d25f785833fca1381c6f23d6364b39e) @@ -49,6 +49,7 @@ SYSTEM_SELF_TEST_TITLE = "System Self Test" MAXIMUM_COUNTDOWN_TIME = 300 MINIMUM_COUNTDOWN_TIME = 0 +COUNT_DOWN_TIME_100 = 100 LOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r428bb27bb381422c94e97c4fb8d3d0e767c6c156 -r3f9d21a04d25f785833fca1381c6f23d6364b39e --- shared/scripts/configuration/utility.py (.../utility.py) (revision 428bb27bb381422c94e97c4fb8d3d0e767c6c156) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 3f9d21a04d25f785833fca1381c6f23d6364b39e) @@ -21,6 +21,7 @@ from configuration import config from builtins import int as pyInt from dialin.ui.hd_simulator import HDSimulator +from dialin.common.hd_defs import HDOpModes from cgitb import text hd_simulator = HDSimulator() @@ -105,7 +106,7 @@ Method to navigate to sub mode under pre-treatment screen @param mode - (int) pre treatment state """ - hd_simulator.cmd_set_hd_operation_mode_data(5,0) + hd_simulator.cmd_set_hd_operation_mode_data(HDOpModes.MODE_PRET.value,0) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=mode, water_sample_state=0, consumables_self_test_state=0, no_cartridge_self_test_state=0, installation_state=0, dry_self_test_state=0, prime_state=0, @@ -116,8 +117,6 @@ min_and_sec = time.strftime("%M:%S", time.gmtime(seconds)) return min_and_sec - - def get_time(screen_title): """ Method to return the current count down @@ -143,20 +142,20 @@ def verify_countdown(screen_title): """ - 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 """ test.startSection("Verify the count down time in application") - for count_down in range(config.MAXIMUM_COUNTDOWN_TIME, config.MINIMUM_COUNTDOWN_TIME-1, -1): + for count_down in range(config.COUNT_DOWN_TIME_100, config.MINIMUM_COUNTDOWN_TIME-1, -1): if screen_title == config.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(300, count_down) elif screen_title == config.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(300, count_down) elif screen_title == config.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(300, 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(300, 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)) @@ -181,7 +180,7 @@ test.compare(current_progress, expected_progress, "{} should be the current progress".format(expected_progress)) test.endSection() -def page_step_indicator_verification(screen_obj, pre_treatment_step): +def verify_page_step_indicator(screen_obj, pre_treatment_step): """ Method to verify the Page Step indicators [the object on top of the screen which indicates the steps passed, current, remained] @param pre_treatment_step : indicates the Current pre-treatment step @@ -213,9 +212,9 @@ test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) test.compare(step_title.color.name, config.INCOMPLETE_COLOR) test.compare(bullet_circle_color, config.CURRENT_COLOR) - test.compare(bullet_border_color, config.INCOMPLETE_COLOR) + test.compare(bullet_border_color, config.INCOMPLETE_COLOR) -def verification_of_missing_object(object_to_check): +def verify_missing_object(object_to_check): """ Method to verify the given object is invisible or is not present on the screen @param object_to_check: the object whose invisibility must be verified Index: tst_pre_treatment_disposables/test.py =================================================================== diff -u -rd490da73a6ff88c175db353d83f5e3f6a1e92647 -r3f9d21a04d25f785833fca1381c6f23d6364b39e --- tst_pre_treatment_disposables/test.py (.../test.py) (revision d490da73a6ff88c175db353d83f5e3f6a1e92647) +++ tst_pre_treatment_disposables/test.py (.../test.py) (revision 3f9d21a04d25f785833fca1381c6f23d6364b39e) @@ -16,6 +16,7 @@ from configuration.config import * from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator +from dialin.common.hd_defs import PreTreatmentSubModes hd_simulator = HDSimulator() @@ -36,7 +37,7 @@ 'System Self Test' title is displayed """ test.startSection("Navigating to disposables and verifying 'System Self Test' title is displayed") - navigate_to_pretreatment_screen(mode=3) + navigate_to_pretreatment_screen(PreTreatmentSubModes.HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE.value) test.compare(SYSTEM_SELF_TEST_TITLE, waitForObject(names.o_system_test_text).text, "'{} title should displayed when user is navigated to disposable screen".format(SYSTEM_SELF_TEST_TITLE)) verify_page_step_indicator(SCREEN_OBJ, PRE_TREATMENT_STEP) test.endSection() @@ -190,7 +191,7 @@ and 'NEXT' button """ test.startSection("Verifying functionality of the cartridge installation screen's left, right navigation and 'NEXT' button") - navigate_to_pretreatment_screen(mode=4) + navigate_to_pretreatment_screen(PreTreatmentSubModes.HD_PRE_TREATMENT_CART_INSTALL_STATE.value) verify_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) verify_left_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) verify_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) @@ -256,5 +257,4 @@ utils.tstDone() - - \ No newline at end of file + \ No newline at end of file