Index: tst_pre_treatment_disposables/test.py =================================================================== diff -u -r428bb27bb381422c94e97c4fb8d3d0e767c6c156 -rd490da73a6ff88c175db353d83f5e3f6a1e92647 --- tst_pre_treatment_disposables/test.py (.../test.py) (revision 428bb27bb381422c94e97c4fb8d3d0e767c6c156) +++ tst_pre_treatment_disposables/test.py (.../test.py) (revision d490da73a6ff88c175db353d83f5e3f6a1e92647) @@ -7,7 +7,7 @@ # # file tst_In_treatment # date 2020/03/18 -# author Amritha Debnat +# author Amrita Debnath # import names @@ -38,58 +38,58 @@ test.startSection("Navigating to disposables and verifying 'System Self Test' title is displayed") navigate_to_pretreatment_screen(mode=3) 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)) - page_step_indicator_verification(SCREEN_OBJ, PRE_TREATMENT_STEP) + verify_page_step_indicator(SCREEN_OBJ, PRE_TREATMENT_STEP) test.endSection() -def verification_of_right_instruction_navigation(num_of_instruction, screen): +def verify_right_instruction_navigation(num_of_instruction, screen): """ Method to verify right arrow functionality and verify the status of back, next and confirm button if available @param num_of_instruction - (int) count the number of instructions, @param screen - (int) current screen """ test.startSection("verifying right arrow functionality and verify the status of left, 'BACK', 'NEXT' and 'CONFIRM' button if available") - verification_of_missing_object(names.o_PreTreatmentBase_leftImage_Image) + verify_missing_object(names.o_PreTreatmentBase_leftImage_Image) for indicator in range(1, num_of_instruction, 1): - verification_of_bullet_navigation(indicator, num_of_instruction) - verification_of_next_button(DISABLED) + verify_bullet_navigation(indicator, num_of_instruction) + verify_next_button(DISABLED) if screen == CARTRIDGE_INSTALLATION: - verification_of_back_button(DISABLED) + verify_back_button(DISABLED) else: - verification_of_back_button(ENABLED) + verify_back_button(ENABLED) if indicator != num_of_instruction: mouseClick(waitForObject(names.o_PreTreatmentBase_rightImage_Image)) - verification_of_missing_object(names.o_PreTreatmentBase_rightImage_Image) - verification_of_next_button(ENABLED) + verify_missing_object(names.o_PreTreatmentBase_rightImage_Image) + verify_next_button(ENABLED) test.endSection() -def verification_of_left_instruction_navigation(num_of_instruction, screen): +def verify_left_instruction_navigation(num_of_instruction, screen): """ Method to verify left arrow functionality and verify the status of back, next and confirm button if available @param num_of_instruction - (int) count the number of instructions, @param screen - (int) current screen """ test.startSection("verifying left arrow functionality and verify the status of left, 'BACK', 'NEXT' and 'CONFIRM' button if available") - verification_of_missing_object(names.o_PreTreatmentBase_rightImage_Image) + verify_missing_object(names.o_PreTreatmentBase_rightImage_Image) for indicator in range(num_of_instruction, 0, -1): - verification_of_bullet_navigation(indicator, num_of_instruction) + verify_bullet_navigation(indicator, num_of_instruction) if indicator == num_of_instruction: - verification_of_next_button(ENABLED) + verify_next_button(ENABLED) else: - verification_of_next_button(DISABLED) + verify_next_button(DISABLED) if screen == CARTRIDGE_INSTALLATION: - verification_of_back_button(DISABLED) + verify_back_button(DISABLED) else: - verification_of_back_button(ENABLED) + verify_back_button(ENABLED) if indicator != 1: mouseClick(waitForObject(names.o_PreTreatmentBase_leftImage_Image)) - verification_of_missing_object(names.o_PreTreatmentBase_leftImage_Image) + verify_missing_object(names.o_PreTreatmentBase_leftImage_Image) test.endSection() -def verification_of_bullet_navigation(num, num_of_instruction): +def verify_bullet_navigation(num, num_of_instruction): """ Method to verify the status of bullets based on the number of instruction screen @@ -111,7 +111,7 @@ test.log(str(instruction) + " Incomplete bullet") test.endSection() -def verification_of_next_button(condition): +def verify_next_button(condition): """ Method to verify the status 'NEXT' button @param condition - (bool) True/False @@ -130,7 +130,7 @@ """ mouseClick(waitForObjectExists(names.o_next_button_text)) -def verification_of_back_button(condition): +def verify_back_button(condition): """ Method to verify the availability of 'BACK' button verify the status of the same @@ -174,7 +174,7 @@ test.compare(expected_screen_text.text, HEPARIN_SYRINGE_TEXT, "{} Should be displayed when navigated to Phase 2 by using BACK button".format(HEPARIN_SYRINGE_TEXT)) test.endSection() -def verification_of_confirm_button(): +def verify_confirm_button(): """ Method to verify the status 'CONFIRM' button """ @@ -183,44 +183,44 @@ test.compare(waitForObjectExists(names.o_confirm_button_text).enabled , True, "'CONFIRM' button should be enabled") test.endSection() -def verify_the_functionality_for_cartridge_installation(): +def verify_functionality_for_cartridge_installation(): """ Method to verify functionality of the cartridge_installation screen's left, right navigation 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) - verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) - verification_of_left_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) - verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + 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) click_on_next_button() test.endSection() -def verify_the_functionality_for_heparin_syringe(): +def verify_functionality_for_heparin_syringe(): """ Method to verify functionality of the heparin syringe screen's left, right navigation and 'NEXT' button """ test.startSection("Verifying functionality of the heparin syringe screen's left, right navigation, 'BACK'and 'NEXT' button") - verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) - verification_of_left_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verify_left_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_back_button() verify_cartridge_installation_first_screen_displayed() - verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + verify_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) click_on_next_button() - verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_back_button() verify_cartridge_installation_first_screen_displayed() - verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + verify_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) click_on_next_button() - verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_next_button() - verification_of_confirm_button() + verify_confirm_button() test.endSection() -def verify_the_functionality_for_saline_bag(): +def verify_functionality_for_saline_bag(): """ Method to verify functionality of the saline bag screen's left, right navigation @@ -231,11 +231,11 @@ verify_heparin_syringe_first_screen_displayed() click_on_back_button() verify_cartridge_installation_first_screen_displayed() - verification_of_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) + verify_right_instruction_navigation(NUM_OF_CARTRIDGE_INSTALLATION_SCREENS, CARTRIDGE_INSTALLATION) click_on_next_button() - verification_of_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) + verify_right_instruction_navigation(NUM_OF_HEPARIN_SYRINGE_SCREENS, HEPARIN_SYRINGE) click_on_next_button() - verification_of_confirm_button() + verify_confirm_button() test.endSection() def main(): @@ -246,13 +246,15 @@ verify_countdown(SYSTEM_SELF_TEST_TITLE) - verify_the_functionality_for_cartridge_installation() + verify_functionality_for_cartridge_installation() utils.waitForGUI(1) - verify_the_functionality_for_heparin_syringe() + verify_functionality_for_heparin_syringe() utils.waitForGUI(1) - verify_the_functionality_for_saline_bag() + verify_functionality_for_saline_bag() utils.tstDone() + + \ No newline at end of file