Index: suite_leahi/tst_rinseback/test.py =================================================================== diff -u -r7c8e3dedfd331c48c595f17878469c42dee2557f -r81e4dab65efa7ef5b4bd2ecd0bf0a5c60c79dc91 --- suite_leahi/tst_rinseback/test.py (.../test.py) (revision 7c8e3dedfd331c48c595f17878469c42dee2557f) +++ suite_leahi/tst_rinseback/test.py (.../test.py) (revision 81e4dab65efa7ef5b4bd2ecd0bf0a5c60c79dc91) @@ -12,10 +12,11 @@ from leahi_dialin.ui.td_messaging import TD_Messaging from leahi_dialin.common.ui_defs import TXStates from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates +from leahi_dialin.utils import conversions td =TD_Messaging() can_interface = td.can_interface -rinsebackrequest = "0" +rinsebackrequest = None request ="[1] Request is not allowed in the current operating mode" def change_treatmentstates(state): @@ -39,12 +40,9 @@ """ message = message['message'] index = MsgFieldPositions.START_POS_FIELD_1 - state,index = conversions.bytearray_to_integer( message, index) global rinsebackrequest - test.log("Inside the function") - rinsebackrequest = str(state) - test.log("After the function") + rinsebackrequest = state def main(): utils.tstStart(__file__) @@ -113,9 +111,11 @@ flow_rate = waitForObject(names.o_EndTreatmentRinseback_flowRateValue_Text) flow_rate_text =flow_rate.text test.log(str(flow_rate_text)) - mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect)) + mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect, 2000)) # handle_solution_infusion_request(MsgIds.MSG_ID_UI_RINSEBACK_CMD_REQUEST.value) - test.verify(waitFor( lambda: rinsebackrequest == 0, 10000), "Testing FW received Arterial Window Value") + global rinsebackrequest + test.log(str(rinsebackrequest)) + test.verify(waitFor( lambda: rinsebackrequest == 3, 5000), "Testing FW received Arterial Window Value") #test rejection td.td_rinseback_cmd_response(vRejectionReason = 1) rejectionReason = waitForObject(utility.setObjectText(text=request ,obj =names.o_EndTreatmentRinseback_NotificationBar_NotificationBarSmall)) @@ -143,10 +143,11 @@ vTimeout = 43, vCountdown = 84, vIsCompleted = 0) - timeouttext = waitForObject(names.o_EndTreatmentRinseback_timeout_TimeText) + timeouttext = waitForObject(names.o_EndTreatmentRinseback_timeout_TimeText, 2000) test.log(str(timeouttext.time)) - mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect)) - test.verify(waitFor( lambda: rinsebackrequest == 4, 10000), "Testing FW received Arterial Window Value") + mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect, 2000)) + test.log(str(rinsebackrequest)) + test.verify(waitFor( lambda: rinsebackrequest == 4, 5000), "Testing FW received Arterial Window Value") td.td_tx_state( TDTreatmentStates.TREATMENT_RINSEBACK_STATE.value, 0 , 0 ,