Index: suite_leahi/tst_rinseback/test.py =================================================================== diff -u -rc2bd9c5111de498925aff408a70f9701d92bc74d -r7c8e3dedfd331c48c595f17878469c42dee2557f --- suite_leahi/tst_rinseback/test.py (.../test.py) (revision c2bd9c5111de498925aff408a70f9701d92bc74d) +++ suite_leahi/tst_rinseback/test.py (.../test.py) (revision 7c8e3dedfd331c48c595f17878469c42dee2557f) @@ -15,7 +15,7 @@ td =TD_Messaging() can_interface = td.can_interface -rinsebackrequest = 0 +rinsebackrequest = "0" request ="[1] Request is not allowed in the current operating mode" def change_treatmentstates(state): @@ -42,9 +42,10 @@ state,index = conversions.bytearray_to_integer( message, index) global rinsebackrequest - rinsebackrequest = state + test.log("Inside the function") + rinsebackrequest = str(state) + test.log("After the function") - def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) @@ -113,11 +114,8 @@ flow_rate_text =flow_rate.text test.log(str(flow_rate_text)) mouseClick(waitForObject(names.o_EndTreatmentRinseback_pauseResumeButton_TouchRect)) - # handle sent messages from UI - - # handle_solution_infusion_request(MsgIds.MSG_ID_UI_RINSEBACK_CMD_REQUEST.value) - test.verify(waitFor( lambda: rinsebackrequest == 3, 10000), "Testing FW received Arterial Window Value") + test.verify(waitFor( lambda: rinsebackrequest == 0, 10000), "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)) @@ -160,8 +158,28 @@ 0 , 0) - test.log("test") + #Increment and decremenet Rinseback + incrementButton = waitForObject(names.o_EndTreatmentRinseback_incrementFlowRateButton_ArrowButton) + mouseClick(incrementButton) + #Verify FW receives request with correct opmode + decrementButton =waitForObject(names.o_EndTreatmentRinseback_decrementFlowRateButton_ArrowButton) + mouseClick(decrementButton) + #End Rinseback + endRinseback = waitForObject(names.o_EndTreatmentRinseback_endButton_TouchRect) + mouseClick(endRinseback) + # verify fw gets request with correct opmode + td.td_tx_state( TDTreatmentStates.TREATMENT_RINSEBACK_STATE.value, + 0 , + 0 , + 0 , + 0 , + TXStates.RINSEBACK_STOP_STATE , + 0 , + 0 , + 0 , + 0) + test.verify(waitForObjectExists(names.o_EndTreatmentRinsebackComplete_instructionView_InstructionView), "In Rinseback complete page") @@ -171,6 +189,3 @@ - - -