Index: tst_Treatment_Adjustment_Saline/test.py =================================================================== diff -u -r24485172848ae32d15cf665b2ef024129dec6ca2 -r867655840cada2d79fa5028c8fab68516ea59673 --- tst_Treatment_Adjustment_Saline/test.py (.../test.py) (revision 24485172848ae32d15cf665b2ef024129dec6ca2) +++ tst_Treatment_Adjustment_Saline/test.py (.../test.py) (revision 867655840cada2d79fa5028c8fab68516ea59673) @@ -14,11 +14,14 @@ import names -from dialin.squish import utils, denaliMessages -from dialin.squish.denaliMessages import txStates +from dialin.ui import utils +from dialin import HDSimulator +from dialin.ui.hd_simulator import TXStates from dialin.common.msg_defs import RequestRejectReasons as rejectReason +HDSimulator = HDSimulator() + def gotoScreenNtest_Contains_TreatmentSalineBolusData(): mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) test.compare(str(waitForObjectExists(names.o_treatmentStart_SalineSection).buttonText), "START BOLUS") @@ -43,7 +46,7 @@ # although rejected value has been sent to check UI only looks for Accept field # value and reason are not related by added those two to have a different value in case of rejection target = 50 + mReason - denaliMessages.setSalineBolusResponse(vAccept, mReason, target, vState) + HDSimulator.cmd_set_saline_bolus_response(vAccept, mReason, target, vState) test.compare(str(waitForObjectExists(names.o_treatmentStart_SalineSection).buttonText), "{} BOLUS".format(vText)) test_target(target) @@ -63,39 +66,39 @@ test_ultrafiltration_touchable(True ) # Initial Idle => Running => Rejected -> Idle/START/UF_True - test_state(False, "START" , txStates.SALINE_BOLUS_STATE_IDLE ) + test_state(False, "START", TXStates.SALINE_BOLUS_STATE_IDLE) test_ultrafiltration_touchable(True ) # retry Idle => Running => Rejected -> Idle/START/UF_True - test_state(False, "START" , txStates.SALINE_BOLUS_STATE_IDLE ) + test_state(False, "START", TXStates.SALINE_BOLUS_STATE_IDLE) test_ultrafiltration_touchable(True ) # Still Idle => Running => Accepted -> Running/STOP/UF_False - test_state(True , "STOP" , txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) + test_state(True, "STOP", TXStates.SALINE_BOLUS_STATE_IN_PROGRESS) test_ultrafiltration_touchable(False) # Now Running => Idle => Rejected -> Running/STOP/UF_False - test_state(False, "STOP" , txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) + test_state(False, "STOP", TXStates.SALINE_BOLUS_STATE_IN_PROGRESS) test_ultrafiltration_touchable(False) # Retry Running => Idle => Rejected -> Running/STOP/UF_False - test_state(False, "STOP" , txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) + test_state(False, "STOP", TXStates.SALINE_BOLUS_STATE_IN_PROGRESS) test_ultrafiltration_touchable(False) # Still Running => Idle => Accepted -> Idle/START/UF_True - test_state(True , "START" , txStates.SALINE_BOLUS_STATE_IDLE ) + test_state(True, "START", TXStates.SALINE_BOLUS_STATE_IDLE) test_ultrafiltration_touchable(True ) # Now Idle => Running => Rejected -> Idle/START/UF_True - test_state(False, "START" , txStates.SALINE_BOLUS_STATE_IDLE ) + test_state(False, "START", TXStates.SALINE_BOLUS_STATE_IDLE) test_ultrafiltration_touchable(True ) # Retry Idle => Running => Rejected -> Idle/START/UF_True - test_state(False, "START" , txStates.SALINE_BOLUS_STATE_IDLE ) + test_state(False, "START", TXStates.SALINE_BOLUS_STATE_IDLE) test_ultrafiltration_touchable(True ) # Still Idle => Running => Accepted -> Running/STOP/UF_False - test_state(True , "STOP" , txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) + test_state(True, "STOP", TXStates.SALINE_BOLUS_STATE_IN_PROGRESS) test_ultrafiltration_touchable(False)