Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r20f65a6962ed2acb2cef7c43ed5e21b23dbe135d -r4a39e403e4b0e1a7a9d4056230528a187cbc44ee --- shared/scripts/configuration/utility.py (.../utility.py) (revision 20f65a6962ed2acb2cef7c43ed5e21b23dbe135d) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 4a39e403e4b0e1a7a9d4056230528a187cbc44ee) @@ -624,7 +624,6 @@ def is_float(num): """ This function checks the value is adaptable for float conversion. - @param num - (string) input value for conversion. @return True/False- (bool) returns True if the value can type casted into float, else False """ @@ -639,7 +638,6 @@ def is_intiger(num): """ This function checks the value is adaptable for integer conversion. - @param num - (string) (string) input value for conversion. @return True/False- (bool) returns True if the value can type casted into int, else False """ @@ -653,12 +651,9 @@ def get_extracted_file(): """ This function is the handler for getting file from log folder. - This handler will go inside log folder and looks for newly added log based on current time. if it satisfied that condition, it will return the exact path of newly created log. - Application log file is automatically created on '/home/denali/Desktop/sd-card/log/ {current_date}_denaliSquish.log' - @return latest_file - (string) returns latest file that append on log folder from sd-data """ try: @@ -674,7 +669,6 @@ """ This method intended to extract the message from application log. For row[index], index represent column to be extracted. - @param file_name - (string) path of the latest log file created. @param message_text - (string) message text to be extracted. @return message - (list) API arguments displayed in log. @@ -718,9 +712,7 @@ """ This method intended to extract acknowledgement request status, negative requested acknowledgement and message id from application log. - For row[index], were index represent column to be extracted. - @param file_name - (string) path of the latest log file created. @param message_text - (string) message text to be extracted from log. @return row[3] - (string) acknowledgement request status. @@ -759,9 +751,7 @@ def get_bak_request_details(file_name, ack_bak_value): """ This method intended to extract the acknowledgement back status from application log. - For row[index], were index represent column to be extracted. - @param file_name - (string) path of the latest log file created. @param ack_bak_value - (string) Positive back acknowledgement value (Sq). @return row[3] - (string) acknowledgement back status. @@ -894,10 +884,8 @@ def get_extracted_file_from_post_treatment(): """ This function is the handler for getting file from log folder. - This handler will go inside log folder and looks for newly added log based on current time. if it satisfied that condition, it will return the exact path of newly created log. - @return latest_file - (string) returns latest file that append on log folder from sd-data """ try: @@ -906,46 +894,6 @@ return latest_file except: test.fail("log file is not created during application interaction") - return False + return False - -def verify_page_step_indicator_post_treatment(screen_obj, post_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 - """ - test.startSection("verification of page step indicators") - for page in range(len(config.POST_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.POST_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 == 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)) - 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)) - test.verify(step_title.font.bold, " the current text must be in bold") - - else: - 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)) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) - test.endSection() - -