Index: shared/scripts/configuration/utility.py =================================================================== diff -u -ra49dadc129e17cde542e98b488ab6407550037c3 -r6d646586c7bf81465255281cb3698b8a0cd25998 --- shared/scripts/configuration/utility.py (.../utility.py) (revision a49dadc129e17cde542e98b488ab6407550037c3) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 6d646586c7bf81465255281cb3698b8a0cd25998) @@ -185,46 +185,7 @@ names.o_rejection_msg["text"] = text return names.o_rejection_msg -def page_step_indicator_verification(pre_treatment_step, pre_treatment_items_object): - """ - Method to verify the Page Step indicators 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 bullet object - @return N/A - """ - test.startSection("Method to verify the Page Step indicators") - for page in range(1, len(config.PRE_TREATMENT_SCREENS)): - pre_treatment_items_object["occurrence"] = page - bullet_children = object.children(squish.waitForObject(pre_treatment_items_object)) - bullet_circle_color = bullet_children[0].color.name - bullet_border_color = bullet_children[0].border.color.name - step_title = bullet_children[2] - #To verify the step indicators of the completed pre treatment screens - if page < pre_treatment_step: - test.verify(squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be True")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) - test.compare(bullet_circle_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(bullet_border_color, config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(step_title.color.name, config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.ENABLED_COLOR))) - #To verify the step indicators of the current pre treatment screen - elif page == pre_treatment_step: - test.verify(squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be True")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) - test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet color hex should be "+str(config.CURRENT_COLOR))) - test.compare(bullet_border_color,config.COMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.COMPLETE_COLOR))) - test.compare(step_title.color.name,config.ENABLED_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.ENABLED_COLOR))) - test.verify(step_title.font.bold, str(config.PRE_TREATMENT_SCREENS[page]+" title font bold should be "+str(config.ENABLED_COLOR))) - #To verify the step indicators of the remaining pre-treatment screens - else: - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).current, str(config.PRE_TREATMENT_SCREENS[page]+" complete attribute should be false")) - test.verify(not squish.waitForObjectExists(pre_treatment_items_object).complete, str(config.PRE_TREATMENT_SCREENS[page]+" current attribute should be false")) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" title color hex should be "+str(config.INCOMPLETE_COLOR))) - test.compare(bullet_circle_color,config.CURRENT_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet circle color hex should be "+str(config.CURRENT_COLOR))) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, str(config.PRE_TREATMENT_SCREENS[page]+" bullet border color hex should be "+str(config.INCOMPLETE_COLOR))) - test.endSection() - - #Methods for create custom treatment def set_venous_ranges_min_val(ven_low): """ @@ -618,7 +579,7 @@ 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 """ - + test.startSection("verification of page step indicators") for page in range(len(config.PRE_TREATMENT_SCREENS)): bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj, page))) bullet_circle_color = bullet_children[0].color.name @@ -646,7 +607,7 @@ 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.endSection() def verify_missing_object(object_to_check): """ @@ -677,16 +638,4 @@ names.o_bullet_object["container"] = screen_obj names.o_bullet_object["occurrence"] = num + 1 return names.o_bullet_object - -def get_indicators(screen_obj, txt): - """ - Verifying the busy indicators for BiCarb Pump Check and Acid Pump Check. - indicator object of expected txt - @param step - (str) expected txt - @return indicators - (obj) list of busy and check indicator - """ - parent_obj = object.parent(squish.waitForObjectExists(get_text_object(screen_obj,txt))) - children_obj = object.children(parent_obj) - indicator_parent = children_obj[2] - indicators = object.children(indicator_parent) - return indicators \ No newline at end of file + \ No newline at end of file