Index: tst_post/test.py =================================================================== diff -u -rd8e758824f486747f73c074b2d24fd1414df9c21 -re8e1cfbba6480bba3e9db47855c170be6461c8c5 --- tst_post/test.py (.../test.py) (revision d8e758824f486747f73c074b2d24fd1414df9c21) +++ tst_post/test.py (.../test.py) (revision e8e1cfbba6480bba3e9db47855c170be6461c8c5) @@ -12,7 +12,7 @@ import names from builtins import int as pyInt -from configuration.config import AUT_NAME +from configuration import config from dialin.ui import utils from dialin.ui.dg_simulator import DGSimulator from dialin.ui.hd_simulator import HDSimulator @@ -24,13 +24,31 @@ MSGS_AND_CONDITIONS = { 1: [True, False], 5: [True, False], 2: [True, False], 4: [True, False], 8: [True, False], 9: [False, False], 3: [True, False], 10: [True, False], 15: [True, False], - 11: [True, False], 17: [True, False], 12: [True, False], + 11: [True, False], 18: [True, False], 12: [True, False], 20: [True, False], 13: [True, False], 14: [True, False], 6: [False, False], 21: [True, False], 7: [True, False], - 22: [True, True], 16: [False, True], 19: [True, True], - 18: [True, True], - } + 17: [True, True], 16: [False, True], 19: [True, True], + 22: [True, True], + } + + +def post_a_message_and_verify_progress_and_completion(msgs_and_conditions): + """ + Method to post message and verify the + progress and completion + @param msgs_and_conditions - (list) list of messages and conditions + @return - None + """ + for msg, conditions in msgs_and_conditions.items(): + final_msg = conditions[0] + final_msg_posted = conditions[1] + hd_simulator.cmd_send_hd_post(msg, final_msg, final_msg_posted) + dg_simulator.cmd_send_dg_post(msg, final_msg, final_msg_posted) + utils.waitForGUI(1) + verify_the_progress(value=msg, final_msg_posted=final_msg_posted) + verify_final_message_posted(final_msg=final_msg, final_msg_posted=final_msg_posted) + def verify_the_progress(value, final_msg_posted) -> None: """ Method to verify the progress @@ -84,28 +102,10 @@ test.compare(busy_indicator.enabled, True, "Waiting for a value") test.endSection() - -def post_a_message_and_verify_progress_and_completion(msgs_and_conditions): - """ - Method to post message and verify the - progress and completion - @param msgs_and_conditions - (list) list of messages and conditions - @return - None - """ - for msg, conditions in msgs_and_conditions.items(): - final_msg = conditions[0] - final_msg_posted = conditions[1] - hd_simulator.cmd_send_hd_post(msg, final_msg, final_msg_posted) - dg_simulator.cmd_send_dg_post(msg, final_msg, final_msg_posted) - utils.waitForGUI(1) - verify_the_progress(value=msg, final_msg_posted=final_msg_posted) - verify_final_message_posted(final_msg=final_msg, final_msg_posted=final_msg_posted) - - def main(): utils.tstStart(__file__) - startApplication(AUT_NAME) + startApplication(config.AUT_NAME) hd_simulator.cmd_send_power_on_self_test_version_request() post_a_message_and_verify_progress_and_completion(MSGS_AND_CONDITIONS)