Index: tst_standbymode/test.py =================================================================== diff -u -r50a76caec4a97fcdeb026d0ea7ec9c2d3c38bfeb -rf10445f970d9504bffcd0d213376da58abcccd9d --- tst_standbymode/test.py (.../test.py) (revision 50a76caec4a97fcdeb026d0ea7ec9c2d3c38bfeb) +++ tst_standbymode/test.py (.../test.py) (revision f10445f970d9504bffcd0d213376da58abcccd9d) @@ -69,21 +69,56 @@ """ mouseClick(waitForObject(names.o_MainHome_Create_Treatment_Button)) - message = utility.cmd_set_create_treatment_click_event(response = True) - event_binary = utility.ui_all_publication_handler(message) + #message = utility.cmd_set_create_treatment_click_event(response = True) + #event_binary = utility.ui_all_publication_handler(message) - test.compare(config.CREATE_TREATMENT_BUTTON_ACTIVE, str(event_binary), "binaries obtained during event-> create treatment button click should be expected") + #test.compare(config.CREATE_TREATMENT_BUTTON_ACTIVE, str(event_binary), "binaries obtained during event-> create treatment button click should be expected") - + +def ui_all_publication_handler(message: dict) -> None: + """ + This function is the default handler of the ui received messages which only prints out the received message + - This function can be used as an example. + - Be careful that there is only one ui publication method + and it will be overwritten on each call to the function set_ui_all_publication of the HDSimulator. + Look into the _init_loader of the Simulator class for example on how to register. + self.interface.hd.set_ui_all_publication(ui_all_publication_handler) + - This function is filtering the two message ID: + MsgIds.MSG_ID_UI_CHECK_IN.value, + MsgIds.MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK.value + for the simplicity of the printed message and as example of how to filter. + That filter can obviously be removed. + @param message: the ui received message + @return: None + """ + exception_msg_id = { + MsgIds.MSG_ID_UI_CHECK_IN.value, + MsgIds.MSG_ID_ACK_MESSAGE_THAT_REQUIRES_ACK.value + } + msg_id = DenaliMessage.get_message_id(message) + if msg_id in exception_msg_id: + return + + test.log(">", DenaliCanMessenger.convert_message_to_string(message)) + + def main(): +<<<<<<< HEAD + utils.tstStart("tst_standbymode") + + + utility.start_application(config.AUT_NAME) +======= utils.tstStart(__file__) startApplication(config.AUT_NAME) +>>>>>>> 50a76caec4a97fcdeb026d0ea7ec9c2d3c38bfeb hd_simulator.cmd_send_power_on_self_test_version_request() hd_simulator.cmd_send_hd_operation_mode(HDOpModes.MODE_STAN.value) + hd_simulator.set_ui_all_publication(ui_all_publication_handler) event_analysis_for_create_treatment_button() current_time = get_current_time() verify_welcome_text_on_standby_mode(current_time)