Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -r3cdfabd1b4528506c3dc52e1557711fd4b72c999 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 3cdfabd1b4528506c3dc52e1557711fd4b72c999) @@ -15,6 +15,8 @@ import sys import test +import names +import object import squish from configuration import config from builtins import int as pyInt @@ -108,3 +110,41 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + + + +def page_step_indicator_verification(pre_treatment_step, pre_treatment_items_object): + """ + 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 :(int) indicates the Current pre-treatment step + @param pre_treatment_items_object :(dictionary) pre_treatment + @return N/A + """ + for page in range(len(config.PRE_TREATMENT_SCREENS)): + bullet_children = object.children(squish.waitForObjectExists(pre_treatment_items_object)) + bullet_circle_color = bullet_children[0].color.name #waitForObjectExsits need to be checked. + bullet_border_color = bullet_children[0].border.color.name + step_title = squish.waitForObjectExists(names.text_object(config.PRE_TREATMENT_SCREENS[page])) + #To verify the step indicators of the completed pre treatment screens + if page < pre_treatment_step: + test.verify(squish.waitForObjectExists(names.bullet_object(page)).complete) + test.verify(not squish.waitForObjectExists(names.bullet_object(page)).current) + test.compare(bullet_circle_color, config.COMPLETE_COLOR) + test.compare(bullet_border_color,config.COMPLETE_COLOR) #config.PRETREATMENT_INDICATOR[1] + test.compare(step_title.color.name,config.ENABLED_COLOR) + #To verify the step indicators of the current pre treatment screen + elif page == pre_treatment_step: + test.verify(squish.waitForObjectExists(names.bullet_object(page)).current,) + test.verify(not squish.waitForObjectExists(names.bullet_object(page)).complete) + test.compare(bullet_circle_color,config.CURRENT_COLOR) + test.compare(bullet_border_color,config.COMPLETE_COLOR) + test.compare(step_title.color.name,config.ENABLED_COLOR) + test.verify(step_title.font.bold) + #To verify the step indicators of the remaining pre-treatment screens + else: + test.verify(not squish.waitForObjectExists(names.bullet_object(page)).current,) + test.verify(not squish.waitForObjectExists(names.bullet_object(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) +