Index: shared/scripts/configuration/utility.py =================================================================== diff -u -rb30019a57e3711d3e3eb859fcf160cb4d9f6905d -rd92045b1bd0502912c00c977a01a13c3c84fcec9 --- shared/scripts/configuration/utility.py (.../utility.py) (revision b30019a57e3711d3e3eb859fcf160cb4d9f6905d) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision d92045b1bd0502912c00c977a01a13c3c84fcec9) @@ -87,7 +87,7 @@ no_cartridge_self_test_state=0,installation_state=0, dry_self_test_state=0, prime_state=0,recirculate_state=0, patient_connection_state=0) -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 Index: tst_pre_treatment_consumables/test.py =================================================================== diff -u -rdb5cd6a63b9c9dbbcb31093af17e742570e356d3 -rd92045b1bd0502912c00c977a01a13c3c84fcec9 --- tst_pre_treatment_consumables/test.py (.../test.py) (revision db5cd6a63b9c9dbbcb31093af17e742570e356d3) +++ tst_pre_treatment_consumables/test.py (.../test.py) (revision d92045b1bd0502912c00c977a01a13c3c84fcec9) @@ -24,6 +24,7 @@ from configuration import config, utility from dialin.ui.hd_simulator import HDSimulator from dialin.ui.utils import waitForGUI +from dialin.common.hd_defs import PreTreatmentConsumableSelfTestStates hd_simulator = HDSimulator() PRE_TREATMENT_STEP= 2 @@ -33,39 +34,37 @@ -def verification_of_right_instruction_navigation(): +def verify_right_instruction_navigation(): """ The method is used to verify the functionality of the right arrow in the instruction navigation, as well as the visibility of the two arrows """ test.startSection(" rightward instruction navigation") test.verify(not object.exists(names.o_PreTreatmentBase_leftImage_Image), " The left arrow must be missing") for indicator in range(1,num_of_instructions + 1): - utils.waitForGUI(1) - verification_of_bullet_navigation(indicator) + verify_bullet_navigation(indicator) if indicator != num_of_instructions: mouseClick(waitForObject(names.o_PreTreatmentBase_rightImage_Image)) test.verify(not object.exists(names.o_PreTreatmentBase_rightImage_Image), " The right arrow must be missing") test.endSection() -def verification_of_left_instruction_navigation(): +def verify_left_instruction_navigation(): """ The method is used to verify the functionality of the left arrow in the instruction navigation, as well as the visibility of the two arrows """ test.startSection(" leftward instruction navigation") test.verify(not object.exists(names.o_PreTreatmentBase_rightImage_Image), " The right arrow must be missing") for indicator in range(num_of_instructions, 0, -1): - utils.waitForGUI(1) - verification_of_bullet_navigation(indicator) + verify_bullet_navigation(indicator) if indicator != 1: mouseClick(waitForObject(names.o_PreTreatmentBase_leftImage_Image)) test.verify(not object.exists(names.o_PreTreatmentBase_leftImage_Image), " The left arrow must be missing") test.endSection() -def verification_of_bullet_navigation(num): +def verify_bullet_navigation(num): """ This method verifies the properties of the bullets present in the instruction navigation screen """ @@ -84,7 +83,7 @@ test.log("The bullet " + str(instruction) + " must be a incomplete bullet") test.endSection() -def verification_of_consumable_states_text(): +def verify_consumable_states_text(): """ Method is to verify the Consumables Self test states' text. """ @@ -93,7 +92,7 @@ test.compare(waitForObjectExists(names.o_PreTreatmentBase_Acid_Pump_Check_Text).text,config.ACID_PUMP_CHECK_TEXT, " text must be from" + config.ACID_PUMP_CHECK_TEXT) test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT," must be " + config.SELF_TEST_COMPLETE_TEXT ) -def verification_of_consumables_states(): +def verify_consumables_states(): """ The method is used to verify the Consumables Self Test states for BiCarb Pump Check @@ -114,8 +113,7 @@ test.verify(not acid_indicator[0].visible , " busy indicator for acid pump must not be present") test.verify(not acid_indicator[1].visible, " check indicator for acid pump must not be present") test.endSection() - test.endSection() - utils.waitForGUI(1) + test.endSection() test.startSection("Verification of Check and busy indicators") test.log(" consumable self test state = 3") @@ -129,8 +127,7 @@ test.verify(not acid_indicator[0].visible," busy indicator for acid pump must not be present") test.verify(not acid_indicator[1].visible," check indicator for acid pump must not be present") - test.log(" consumable self test state = 4") - utils.waitForGUI(1) + test.log(" consumable self test state = 4") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=2, water_sample_state=0, consumables_self_test_state=4, no_cartridge_self_test_state=0, installation_state=0, dry_self_test_state=0, prime_state=0, @@ -141,10 +138,9 @@ test.verify(waitForObject(bicarb_indicator[1]).visible,"The check indicator for Bicarb Pump must be visible") test.log("BiCarb Pump Check is completed") test.verify(waitForObject(acid_indicator[0]).visible,"The Busy indicator for Acid Pump must be visible") - test.log(" consumable self test state = 5") - utils.waitForGUI(1) + test.log(" consumable self test state = 5") hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=2, water_sample_state=0, - consumables_self_test_state=5, no_cartridge_self_test_state=0, + consumables_self_test_state= 5, no_cartridge_self_test_state=0, installation_state=0, dry_self_test_state=0, prime_state=0, recirculate_state=0, patient_connection_state=0) @@ -157,23 +153,22 @@ test.log("Self test complete for consumables is done") test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT," text must be " + config.SELF_TEST_COMPLETE_TEXT ) test.endSection() - utils.waitForGUI(1) def main(): global num_of_instructions utils.tstStart(__file__) startApplication(config.AUT_NAME) utility.navigate_to_pretreatment_screen(mode= PRE_TREATMENT_STEP) - utility.page_step_indicator_verification(SCREEN_OBJ, PRE_TREATMENT_STEP) + utility.verify_page_step_indicator(SCREEN_OBJ, PRE_TREATMENT_STEP) test.startSection("verification of instruction navigation ") names.o_bullet_object.pop("occurrence") list_of_bullets = findAllObjects(names.o_bullet_object) num_of_instructions = len(list_of_bullets) - config.NUM_OF_PRETREATMENT_BULLETS test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled, " confirm button must not be active") - verification_of_right_instruction_navigation() + verify_right_instruction_navigation() test.verify(waitForObjectExists(names.o_confirm_button_enabled).enabled, " confirm button must be active") - verification_of_left_instruction_navigation() + verify_left_instruction_navigation() test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled ," confirm button must not be active") for right_arrow in range(1, num_of_instructions): @@ -182,12 +177,12 @@ mouseClick(waitForObject(names.o_confirm_button_enabled)) test.endSection() - utils.waitForGUI(1) + test.startSection("verification of consumable self test ") test.verify(not object.exists(names.o_PreTreatmentBase_Self_Test_Complete_Text),config.SELF_TEST_COMPLETE_TEXT + " must not be present ") - verification_of_consumables_states() - verification_of_consumable_states_text() + verify_consumables_states() + verify_consumable_states_text() test.endSection() utils.tstDone()