Index: shared/scripts/names.py =================================================================== diff -u -r92a813d62f26a3e5ddf77b3b58b5c965fadeffb5 -rd53166805a654f22111b6af975018b61520dfdba --- shared/scripts/names.py (.../names.py) (revision 92a813d62f26a3e5ddf77b3b58b5c965fadeffb5) +++ shared/scripts/names.py (.../names.py) (revision d53166805a654f22111b6af975018b61520dfdba) @@ -68,14 +68,17 @@ o_treatmentStart_0_Text_2 = {"container": o_treatmentStart_TreatmentStart, "occurrence": 2, "text": 0, "type": "Text", "unnamed": 1, "visible": True} o_treatmentStart_mL_min_Text_2 = {"container": o_treatmentStart_TreatmentStart, "occurrence": 2, "text": "mL/min", "type": "Text", "unnamed": 1, "visible": True} + + + # Treatment Parameter Range o_dialysateFlowSlider_Slider = {"container": o_Overlay, "id": "_dialysateFlowSlider", "type": "Slider", "unnamed": 1, "visible": True} o_bloodFlowSlider_Slider = {"container": o_Overlay, "id": "_bloodFlowSlider", "type": "Slider", "unnamed": 1, "visible": True} o_treatmentStart_225_Text = {"container": o_treatmentStart_TreatmentStart, "text": 225, "type": "Text", "unnamed": 1, "visible": True} o_treatmentStart_200_Text = {"container": o_treatmentStart_TreatmentStart, "text": 200, "type": "Text", "unnamed": 1, "visible": True} -o_TouchRect = {"container": o_Overlay, "type": "TouchRect", "unnamed": 1, "visible": True} + # Treatment Time o_treatmentStart_01_Text = {"container": o_treatmentStart_TreatmentStart, "text": "01", "type": "Text", "unnamed": 1, "visible": True} o_treatmentStart_00_Text = {"container": o_treatmentStart_TreatmentStart, "occurrence": 2, "text": "00", "type": "Text", "unnamed": 1, "visible": True} @@ -104,9 +107,14 @@ # Reviewed Objects # Global Objects -o_backButton = {"container": o_Overlay, "id": "_backButton" , "type": "BackButton" } -o_closeButton = {"container": o_Overlay, "id": "_closeButton", "type": "CloseButton" } +o_backButton = {"container": o_Overlay, "id": "_backButton" , "type": "BackButton" } +o_closeButton = {"container": o_Overlay, "id": "_closeButton" , "type": "CloseButton" } +o_confirmButton = {"container": o_Overlay, "id": "_confirmButton" , "type": "TouchRect" } +# Treatment Adjustment Duration +o_treatmentAdjustmentDuration_Screen = {"container": o_Overlay, "objectName": "TreatmentAdjustmentDuration" , "type": "ContentItem" } + + # Treatment Adjustment Ultrafiltration ## Start Screen o_treatmentAdjustmentUltrafiltrationStart_Screen = {"container": o_Overlay, "objectName": "TreatmentAdjustmentUltrafiltrationStart" , "type": "ContentItem" } Index: tst_Treatment_Adjustment_BloodDialysate/test.py =================================================================== diff -u -rb795e6250294344ef7b0396bae4648fb2aa306b3 -rd53166805a654f22111b6af975018b61520dfdba --- tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision b795e6250294344ef7b0396bae4648fb2aa306b3) +++ tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision d53166805a654f22111b6af975018b61520dfdba) @@ -49,12 +49,12 @@ test.compare(waitForObjectExists(names.o_dialysateFlowSlider_Slider).value, 200) # sendTreatmentAdjustBloodDialysateRequest - mouseClick(waitForObject(names.o_TouchRect)) + mouseClick(waitForObject(names.o_confirmButton)) denaliMessages.waitForMessageToBeSent() utils.waitForGUI(7) # wait for ack timeout 5 is the timeout added +2 Sec for safe range. # sendTreatmentAdjustBloodDialysateRequest again - mouseClick(waitForObject(names.o_TouchRect)) + mouseClick(waitForObject(names.o_confirmButton)) denaliMessages.waitForMessageToBeSent() denaliMessages.send_acknowledge_HD() Index: tst_Treatment_Adjustment_Duration/test.py =================================================================== diff -u -rb795e6250294344ef7b0396bae4648fb2aa306b3 -rd53166805a654f22111b6af975018b61520dfdba --- tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision b795e6250294344ef7b0396bae4648fb2aa306b3) +++ tst_Treatment_Adjustment_Duration/test.py (.../test.py) (revision d53166805a654f22111b6af975018b61520dfdba) @@ -68,7 +68,7 @@ # touch confirm # AdjustDurationReq - mouseClick(waitForObjectExists(names.o_TouchRect).text) + mouseClick(waitForObjectExists(names.o_confirmButton)) # rejected 65, revert to 75 denaliMessages.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) Index: tst_Treatment_Adjustment_Ultrafiltration/test.py =================================================================== diff -u -r92a813d62f26a3e5ddf77b3b58b5c965fadeffb5 -rd53166805a654f22111b6af975018b61520dfdba --- tst_Treatment_Adjustment_Ultrafiltration/test.py (.../test.py) (revision 92a813d62f26a3e5ddf77b3b58b5c965fadeffb5) +++ tst_Treatment_Adjustment_Ultrafiltration/test.py (.../test.py) (revision d53166805a654f22111b6af975018b61520dfdba) @@ -158,19 +158,23 @@ test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationEdit_NotificationBar).text), "REQUEST_REJECT_REASON_UF_RATE_OUT_OF_RANGE") -def update_Adjustment_Ranges(): +def updateNTest_Adjustment_Ranges(vMinUFVolume, vMaxUFVolume): # HD sends Ultrafiltration ranges - denaliMessages.setTreatmentParamRanges(0, 0, 100, 4800, 0, 0) + denaliMessages.setTreatmentParamRanges(0, 0, vMinUFVolume, vMaxUFVolume, 0, 0) + # Edit Screen updates Ultrafiltration ranges on Slider upon Receiving Ranges + test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationEdit_VolumeSlider).minText.text), "{:.3f}".format(utils.ml2l(vMinUFVolume))) + test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationEdit_VolumeSlider).maxText.text), "{:.3f}".format(utils.ml2l(vMaxUFVolume))) def user_Adjusted(): - # Edit Screen updates Ultrafiltration ranges on Slider upon Receiving Ranges - test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationEdit_VolumeSlider).minText.text), "0.100") - test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationEdit_VolumeSlider).maxText.text), "4.800") # Edit Screen updated the adjusted Ultrafiltration value mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationEdit_VolumeSlider), 430, 1, Qt.LeftButton) +def next_Clicked(): + mouseClick(waitForObject(names.o_treatmentAdjustmentUltrafiltrationEdit_NextButton)) + + def adjustmentResponse(): denaliMessages.setTreatmentAdjustUltrafiltrationEditResponse(_Accepted, _Reason, _Volume, _Duration, _DurationDiff, _Rate, _RateDiff, _RateOld) @@ -216,6 +220,7 @@ test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_Screen).visible, True) test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_PausedText).text), "Ultrafiltration is paused.") test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton).text.text), "CONFIRM") + test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton).disabled, True) test.compare(str(waitForObjectExists(o_backButton).text.text), "BACK") #[Confirm Title / Ultrafiltration Volume] @@ -276,7 +281,18 @@ test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_AdjustmentButtonDuration_DiffImageClock).isIncrease, mIncrease ) test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_AdjustmentButtonDuration_DiffImageWave ).visible , False) +def confirm_Request_Rate(): + mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationConfirm_AdjustmentButtonRate)) + test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton).disabled, False) + mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton)) + +def confirm_Request_Duration(): + mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationConfirm_AdjustmentButtonDuration)) + test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton).disabled, False) + mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationConfirm_ConfirmButton)) + + def confirm_RejectNTest(): denaliMessages.setTreatmentAdjustUltrafiltrationConfirmRejected(2) test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_NotificationBar).visible, True) @@ -290,7 +306,7 @@ def main(): utils.tstStart() - startApplication("denali") # denaliSquish + startApplication("denaliSquish") # denaliSquish utils.waitForGUI(1) gotoScreenNtest_Contains_Ultrafiltration() @@ -350,10 +366,11 @@ # Edit Screen upon Used Edit Button edit_Clicked() - update_Adjustment_Ranges() + updateNTest_Adjustment_Ranges(600, 2400) + updateNTest_Adjustment_Ranges(100, 4800) user_Adjusted() - + next_Accepted(2400, eIncrease, eIncrease) back_Clicked() @@ -364,45 +381,50 @@ # So Volume is not necessarily correct - # ----- Rate Inc - next_Accepted(2400, eIncrease, eIncrease) + # ----- Rate Inv + next_Accepted( 0, eInvalid , eIncrease) back_Clicked() - next_Accepted(2400, eIncrease, eDecrease) + next_Accepted( 20, eInvalid , eDecrease) back_Clicked() - next_Accepted(2400, eIncrease, eInvalid ) + next_Accepted( 40, eInvalid , eInvalid ) back_Clicked() - # ----- Rate Dec - next_Accepted( 300, eDecrease, eIncrease) + # ----- Rate Inc + next_Accepted(1200, eIncrease, eIncrease) back_Clicked() - next_Accepted( 300, eDecrease, eDecrease) + next_Accepted(1800, eIncrease, eDecrease) back_Clicked() - next_Accepted( 300, eDecrease, eInvalid ) + next_Accepted(2400, eIncrease, eInvalid ) back_Clicked() - # ----- Rate Inv - next_Accepted( 0, eInvalid , eIncrease) + # ----- Rate Dec + next_Accepted( 300, eDecrease, eIncrease) back_Clicked() - next_Accepted( 0, eInvalid , eDecrease) + next_Accepted( 400, eDecrease, eDecrease) back_Clicked() - next_Accepted( 0, eInvalid , eInvalid ) + next_Accepted( 500, eDecrease, eInvalid ) back_Clicked() - # ----- Coverage - Duration Duplicate - next_Accepted(2400, eIncrease, eIncrease) - back_Clicked() + # ----- Duration Inv + next_Accepted( 0, eIncrease, eInvalid ) + back_Clicked() + + next_Accepted( 20, eDecrease, eInvalid ) + back_Clicked() + + next_Accepted( 40, eInvalid , eInvalid ) # ----- Duration Inc - next_Accepted(2400, eIncrease, eIncrease) + next_Accepted(1200, eIncrease, eIncrease) back_Clicked() - next_Accepted(2400, eDecrease, eIncrease) + next_Accepted(1800, eDecrease, eIncrease) back_Clicked() next_Accepted(2400, eInvalid , eIncrease) @@ -412,25 +434,27 @@ next_Accepted( 300, eIncrease, eDecrease) back_Clicked() - next_Accepted( 300, eDecrease, eDecrease) + next_Accepted( 400, eDecrease, eDecrease) back_Clicked() - next_Accepted( 300, eInvalid , eDecrease) + next_Accepted( 500, eInvalid , eDecrease) back_Clicked() - # ----- Duration Inv - next_Accepted( 0, eIncrease, eInvalid ) - back_Clicked() - - next_Accepted( 0, eDecrease, eInvalid ) - back_Clicked() - - next_Accepted( 0, eInvalid , eInvalid ) - + # options request + next_Accepted(3600, eIncrease, eIncrease) + + confirm_Request_Rate() confirm_RejectNTest() + + # options request + next_Accepted(4800, eIncrease, eIncrease) + confirm_Request_Duration() + confirm_RejectNTest() confirm_Accept(1200, 2 *60, 20) + + utils.tstDone()