Index: suite_leahi/tst_edit_parameters/test.py =================================================================== diff -u -r8a2c16a0af26e03c9bcb54dcb3c6b88907ffddab -r3092de4d51953039ef1a683b8f8708f798996afe --- suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 8a2c16a0af26e03c9bcb54dcb3c6b88907ffddab) +++ suite_leahi/tst_edit_parameters/test.py (.../test.py) (revision 3092de4d51953039ef1a683b8f8708f798996afe) @@ -14,11 +14,11 @@ from leahi_dialin.protocols import CAN td =TD_Messaging() -# ArtWindow ="0" -# Venouspressurewindow = "0" -# venouspressurelimitasymetric ="0" -# tmppressurelimut ="0" -# salineBolusvalue ="0" +ArtWindow = None +Venouspressurewindow ="0" +venouspressurelimitasymetric ="0" +tmppressurelimut ="0" +salineBolusvalue ="0" @@ -68,6 +68,7 @@ ArtWindow = state test.log("Inside function") test.log(str(ArtWindow)) + test.log(str(state)) state,index = conversions.bytearray_to_integer( message, index) global Venouspressurewindow @@ -91,8 +92,8 @@ def main(): can_interface = td.can_interface - global ArtWindow global Venouspressurewindow + if can_interface is not None: channel_id = CAN.DenaliChannels.ui_to_td_ch_id message_id = MsgIds.MSG_ID_UI_PRESSURE_LIMITS_CHANGE_REQUEST.value @@ -161,17 +162,8 @@ test.compare(rejectionReason.text, "[1] Request is not allowed in the current operating mode", "Rejection Reason text should be :" + str("[1] Request is not allowed in the current operating mode")) # handle sent messages from UI - mouseClick(waitForObject(names.o_confirmButton_TouchRect)) - # if can_interface is not None: - # channel_id = CAN.DenaliChannels.ui_to_td_ch_id - # message_id = MsgIds.MSG_ID_UI_PRESSURE_LIMITS_CHANGE_REQUEST.value - # can_interface.register_receiving_publication_function(channel_id, - # message_id, - # handle_pressure_request) - # - #rejection reason 0 payload = conversions.integer_to_bytearray(1) @@ -183,7 +175,13 @@ has_parameters = True, parameters_payload= payload) + global ArtWindow + test.verify(waitFor( lambda: ArtWindow == 10, 5000), "Testing lambda this should fail") + test.verify(waitFor( lambda: ArtWindow == arterialwindow_value.value, 5000), "Testing FW received Arterial Window Value") + test.log("Post waitfor() Verify ArtWindow: ") test.log(str(ArtWindow)) + test.log(str(arterialwindow_value.value)) + test.verify(Venouspressurewindow == venouswindow_value.value ) pressurepopup = waitFor(lambda: not object.exists(names.o_HeaderBar_WiFi_Popup), 3000) test.compare(pressurepopup, True, "Popup is not present")