Index: shared/scripts/configuration/utility.py =================================================================== diff -u -ra839be877cfbc786c081d8d4f3b7201d73370af7 -re5d08a5c268ba1698bc10697fad797aabc33e4cb --- shared/scripts/configuration/utility.py (.../utility.py) (revision a839be877cfbc786c081d8d4f3b7201d73370af7) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision e5d08a5c268ba1698bc10697fad797aabc33e4cb) @@ -73,28 +73,28 @@ raise LookupError("zone object is not in view to the user after trying 100 times") -def verify_page_step_indicator(screen_obj, pre_treatment_step): +def verify_page_step_indicator(screen_obj, treatment_step, treatment_screens): """ 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 + @param treatment_step : indicates the Current treatment step """ test.startSection("verification of page step indicators") - for page in range(len(config.PRE_TREATMENT_SCREENS)): + for page in range(len(treatment_screens)): bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) bullet_circle_color = bullet_children[0].color.name bullet_border_color = bullet_children[0].border.color.name - step_title = squish.waitForObjectExists(get_text_object(screen_obj, config.PRE_TREATMENT_SCREENS[page])) + step_title = squish.waitForObjectExists(get_text_object(screen_obj, treatment_screens[page])) - if page < pre_treatment_step: - test.log("To verify the step indicator of the completed pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) + if page < treatment_step: + test.log("To verify the step indicator of the completed treatment screen " + treatment_screens[page]) test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) test.compare(bullet_circle_color, config.COMPLETE_COLOR, " the bullet color must be " + str(config.COMPLETE_COLOR)) test.compare(bullet_border_color, config.COMPLETE_COLOR," the bullet border color must be " + str(config.COMPLETE_COLOR)) test.compare(step_title.color.name, config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - elif page == pre_treatment_step: - test.log("To verify the step indicators of the current pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) + elif page == treatment_step: + test.log("To verify the step indicators of the current treatment screen " + treatment_screens[page]) test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) @@ -103,7 +103,7 @@ test.verify(step_title.font.bold, " the current text must be in bold") else: - test.log("To verify the step indicators of the remaining pre-treatment screen " + config.PRE_TREATMENT_SCREENS[page]) + test.log("To verify the step indicators of the remaining treatment screen " + treatment_screens[page]) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) test.compare(step_title.color.name,config.INCOMPLETE_COLOR, " the text color must be " + str(config.INCOMPLETE_COLOR)) Index: tst_pre_treatment_patient_connection/test.py =================================================================== diff -u -r45781d590286e5810f0c6d7c5cfbd9732264aee4 -re5d08a5c268ba1698bc10697fad797aabc33e4cb --- tst_pre_treatment_patient_connection/test.py (.../test.py) (revision 45781d590286e5810f0c6d7c5cfbd9732264aee4) +++ tst_pre_treatment_patient_connection/test.py (.../test.py) (revision e5d08a5c268ba1698bc10697fad797aabc33e4cb) @@ -271,7 +271,7 @@ navigate_patient_connection(PRE_TREATMENT_PATIENT_CONNECTION_MODE) #verification of indicators from patient connection section - utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, UF_PRE_TREATMENT_STEPS) + utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, UF_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of uf slider based on edge condition. for ranges in config.TREATMENT_ULTRAFILTERATION_TESTING_OPTION: @@ -287,13 +287,13 @@ hd_simulator.cmd_send_uf_treatment_response(accepted = True, reason = 0, volume = config.UF_VALID_RANGE) #verification of indicators from BP/HR section - utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, BP_HR_PRE_TREATMENT_STEPS) + utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, BP_HR_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of BP/HR entries based on edge condition test_vital_entries_on_patient_connection() #verification of indicators from Connection section - utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, CONNECTION_PRE_TREATMENT_STEPS) + utility.verify_page_step_indicator(names.o_PreTreatmentStack_pretreatmentConnectionStack_PreTreatmentConnectionStack, CONNECTION_PRE_TREATMENT_STEPS, config.PRE_TREATMENT_SCREENS) #verification of tutorial section test_patient_connection_instruction_screen()