Index: shared/scripts/names.py =================================================================== diff -u -rd95e4751c8ebf874c55869608a25492e8e5aa444 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- shared/scripts/names.py (.../names.py) (revision d95e4751c8ebf874c55869608a25492e8e5aa444) +++ shared/scripts/names.py (.../names.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -84,3 +84,15 @@ o_ALARM_ID_MESSAGE = {"container": o_QQuickView, "id": "_alarm", "type": "Rectangle", "objectName": "NotificationBar", "visible": True} o_treatmentStart_SalineTouchArea_TreatmentFluid = {"container": o_treatmentStart_TreatmentStart, "id": "_SalineTouchArea", "type": "TreatmentFluid", "unnamed": 1, "visible": True} o_treatmentStart_heparinTouchArea_TreatmentFluid = {"container": o_treatmentStart_TreatmentStart, "id": "_heparinTouchArea", "type": "TreatmentFluid", "unnamed": 1, "visible": True} + +o_treatmentStart_TimeText_TimeText = {"container": o_treatmentStart_TreatmentStart, "objectName": "_TimeText", "type": "TimeText", "visible": True} +o_treatmentStart_TimeText_hour_Text = {"container": o_treatmentStart_TreatmentStart, "objectName": "_TimeText_hour", "type": "Text", "visible": True} +o_treatmentStart_TimeText_minute_Text = {"container": o_treatmentStart_TreatmentStart, "objectName": "_TimeText_minute", "type": "Text", "visible": True} +o_treatmentStart_TimeText_second_Text = {"container": o_treatmentStart_TreatmentStart, "objectName": "_TimeText_second", "type": "Text", "visible": True} +o_durationSlider_Slider = {"container": o_Overlay, "id": "_durationSlider", "type": "Slider", "unnamed": 1, "visible": True} +o_TimeText_TimeText = {"container": o_Overlay, "objectName": "_TimeText", "type": "TimeText", "visible": True} +o_TimeText_hour_Text = {"container": o_Overlay, "objectName": "_TimeText_hour", "type": "Text", "visible": True} +o_TimeText_minute_Text = {"container": o_Overlay, "objectName": "_TimeText_minute", "type": "Text", "visible": True} +o_TimeText_second_Text = {"container": o_Overlay, "objectName": "_TimeText_second", "type": "Text", "visible": True} +o_TimeText_hour_Text_2 = {"container": o_Overlay, "objectName": "_TimeText_hour", "occurrence": 2, "type": "Text", "visible": True} +o_TimeText_minute_Text_2 = {"container": o_Overlay, "objectName": "_TimeText_minute", "occurrence": 2, "type": "Text", "visible": True} Index: tst_Alarm/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Alarm/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Alarm/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -20,6 +20,7 @@ utils.tstStart() startApplication("denaliSquish") + utils.waitForGUI(1) denaliMessages.sendAlarm(3, 26, 2, 0, 0) test.compare(waitForObjectExists(names.o_ALARM_ID_MESSAGE).level, 3) Index: tst_HomeScreen/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_HomeScreen/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_HomeScreen/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -19,6 +19,7 @@ utils.tstStart() startApplication("denaliSquish") + utils.waitForGUI(1) test.compare( waitForObjectExists(names.o_treatmentHome).visible, True) test.compare(str(waitForObjectExists(names.o_treatmentHome_startTreatment ).text.text), "START TREATMENT" , "SRSUI 024") Index: tst_ServiceShutdown/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_ServiceShutdown/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_ServiceShutdown/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -80,11 +80,12 @@ def main(): utils.tstStart() - # Start the Application startApplication("denaliSquish") + utils.waitForGUI(1) + # 535 : The "Treatment" button shall be selected by default on the Home Screen. test_MainMenu_CurrentItem(535) Index: tst_TreatmentScreen/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_TreatmentScreen/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_TreatmentScreen/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -19,6 +19,8 @@ utils.tstStart() startApplication("denaliSquish") + utils.waitForGUI(1) + mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) test.compare(waitForObjectExists(names.o_treatmentStart_backgroundRect_Rectangle).visible, True) Index: tst_Treatment_Adjustment_BloodDialysate/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -28,6 +28,7 @@ utils.tstStart() startApplication("denaliSquish") # + utils.waitForGUI(1) gotoScreenNtest_Contains_FlowsSection() utils.waitForGUI(1) Index: tst_Treatment_Adjustment_Duration/test.py =================================================================== diff -u --- tst_Treatment_Adjustment_Duration/test.py (revision 0) +++ tst_Treatment_Adjustment_Duration/test.py (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- + +## +# Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +# copyright +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, +# IN PART OR IN WHOLE, +# WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# file tst_Treatment_Adjustment_Duration +# date 2020/04/28 +# author Behrouz NematiPour +# + +import names +import utils +import denaliMessages + +def gotoScreenNtest_Contains_DurationSection(): + mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) + test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) + +def gotoScreenNTest_Adjustment(): + mouseClick(waitForObject(names.o_treatmentStart_shape_Shape)) + test.compare(waitForObjectExists(names.o_modalDialog).visible, True) + +def main(): + + startApplication("denaliSquish") + utils.tstStart() + utils.waitForGUI(1) + + gotoScreenNtest_Contains_DurationSection() + utils.waitForGUI(1) + + durationMin = 0 + durationMax = 60 * 3 # 3h + durationElapsed = 10 # 10m + + denaliMessages.setTreatmentTime(durationMax, durationElapsed) + + test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_TimeText ).time), "00:02:50") + test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_hour_Text ).text), "00") + test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_minute_Text).text), "02") + test.compare(str(waitForObjectExists(names.o_treatmentStart_TimeText_second_Text).text), "50") + + gotoScreenNTest_Adjustment() + utils.waitForGUI(1) + + denaliMessages.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + + test.compare(waitForObjectExists(names.o_durationSlider_Slider).minimum, durationMin) + test.compare(waitForObjectExists(names.o_durationSlider_Slider).maximum, durationMax) + + durationMin = 10 # 10m + durationMax = 60 * 2 # 2h + denaliMessages.setTreatmentParamRanges(durationMin, durationMax, 0, 0, 0, 0) + test.compare(waitForObjectExists(names.o_durationSlider_Slider).minimum, durationMin) + test.compare(waitForObjectExists(names.o_durationSlider_Slider).maximum, durationMax) + + # the duration dialog should use the same value as the Treatment time + test.compare(str(waitForObjectExists(names.o_TimeText_TimeText).time), "00:02:50") + test.compare(str(waitForObjectExists(names.o_TimeText_hour_Text).text), "00") + test.compare(str(waitForObjectExists(names.o_TimeText_minute_Text).text), "02") + test.compare(str(waitForObjectExists(names.o_TimeText_second_Text).text), "50") + + # touch on the middle of the slider + mouseClick(waitForObject(names.o_durationSlider_Slider), waitForObjectExists(names.o_durationSlider_Slider).width / 2, 5, Qt.LeftButton) + + # touch confirm + # AdjustDurationReq + mouseClick(waitForObjectExists(names.o_TouchRect).text) + + # rejected 65, revert to 75 + denaliMessages.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + test.compare(str(waitForObjectExists(names.o_TimeText_hour_Text_2 ).text), "01") + test.compare(str(waitForObjectExists(names.o_TimeText_minute_Text_2).text), "15") + + + # rejected 65, revert to 75 # let's see if we got twice with no change do we still act the same + denaliMessages.sendTreatmentAdjustDurationResponse(0, 4, 75, 0) + test.compare(str(waitForObjectExists(names.o_TimeText_hour_Text_2 ).text), "01") + test.compare(str(waitForObjectExists(names.o_TimeText_minute_Text_2).text), "15") + + test.compare(waitForObjectExists(names.o_modalDialog).visible, True) + + # accepted + denaliMessages.sendTreatmentAdjustDurationResponse(1, 0, 45, 1000) + test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) + + utils.tstDone() + Index: tst_Treatment_BloodFlowRate/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_BloodFlowRate/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_BloodFlowRate/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -24,7 +24,8 @@ utils.tstStart() startApplication("denaliSquish") - + utils.waitForGUI(1) + gotoScreenNtest_Contains_FlowsSection() utils.waitForGUI(1) Index: tst_Treatment_DialysateFlowRate/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_DialysateFlowRate/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_DialysateFlowRate/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -24,7 +24,8 @@ utils.tstStart() startApplication("denaliSquish") - + utils.waitForGUI(1) + gotoScreenNtest_Contains_FlowsSection() utils.waitForGUI(1) Index: tst_Treatment_ParametersRange/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_ParametersRange/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_ParametersRange/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -34,8 +34,10 @@ utils.tstStart() startApplication("denaliSquish") - + utils.waitForGUI(1) + gotoScreenNtest_Contains_FlowsSection() + utils.waitForGUI(1) gotoScreenNTest_Contains_Ranges() utils.waitForGUI(1) Index: tst_Treatment_PressureOcclusion/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_PressureOcclusion/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_PressureOcclusion/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -24,7 +24,8 @@ utils.tstStart() startApplication("denaliSquish") - + utils.waitForGUI(1) + gotoScreenNtest_Contains_PressureOcclusion() utils.waitForGUI(1) Index: tst_Treatment_Section_BloodDialysate/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_Section_BloodDialysate/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_Section_BloodDialysate/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -19,10 +19,11 @@ utils.tstStart() startApplication("denaliSquish") + utils.waitForGUI(1) # Goto Treatment Screen mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) - + # Flows section is available test.compare(waitForObjectExists(names.o_treatmentStart_flowsTouchArea_TreatmentFlows).visible, True) Index: tst_Treatment_Time/test.py =================================================================== diff -u -r929c42f19c662c57ae264d200658fb1690353008 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_Time/test.py (.../test.py) (revision 929c42f19c662c57ae264d200658fb1690353008) +++ tst_Treatment_Time/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -33,6 +33,7 @@ def main(): startApplication("denaliSquish") + utils.waitForGUI(1) gotoScreenNtest_Contains_TimeSection() utils.waitForGUI(1) Index: tst_Treatment_Ultrafiltration/test.py =================================================================== diff -u -ra1bf6e9dc0dacf5aee003365d3472e43075d00a7 -r7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f --- tst_Treatment_Ultrafiltration/test.py (.../test.py) (revision a1bf6e9dc0dacf5aee003365d3472e43075d00a7) +++ tst_Treatment_Ultrafiltration/test.py (.../test.py) (revision 7b3e5d5ca42caaf50fc24bc9ea6710d99681ea3f) @@ -33,6 +33,7 @@ utils.tstStart() startApplication("denaliSquish") + utils.waitForGUI(1) gotoScreenNtest_Contains_Ultrafiltration() utils.waitForGUI(1)