Index: shared/scripts/names.py =================================================================== diff -u -refb0dcc34f39f35d41f43cca9667db17fd97c844 -r2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24 --- shared/scripts/names.py (.../names.py) (revision efb0dcc34f39f35d41f43cca9667db17fd97c844) +++ shared/scripts/names.py (.../names.py) (revision 2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24) @@ -242,20 +242,27 @@ o_arterial_progress = {"container": o_arterial_range_slider , "id": "_pressureRangeBar", "type": "RangeBar" } o_arterial_progress_textMinimum = {"container": o_arterial_progress , "id": "_textMinimum" , "type": "Text" } o_arterial_progress_textMaximum = {"container": o_arterial_progress , "id": "_textMaximum" , "type": "Text" } +o_arterial_marker = {"container": o_arterial_progress , "id": "_rangeMarkerValue", "type": "RangeMarker" } +o_arterial_progress_textValue = {"container": o_arterial_marker , "id": "_textValue" , "type": "Text" } # arterial slider -o_arterial_slider = {"container": o_arterial_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } -o_arterial_slider_textMinimum = {"container": o_arterial_slider , "id": "_textMinimum" , "type": "Text" } -o_arterial_slider_textMaximum = {"container": o_arterial_slider , "id": "_textMaximum" , "type": "Text" } +o_arterial_slider = {"container": o_arterial_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } +# arterial limits bar +o_arterial_limitbar = {"container": o_arterial_range_slider , "id": "_rangeRect" , "type": "RangeRect" } +o_arterial_limitbar_textMinimum = {"container": o_arterial_limitbar , "id": "_textMinimum" , "type": "Text" } +o_arterial_limitbar_textMaximum = {"container": o_arterial_limitbar , "id": "_textMaximum" , "type": "Text" } # venous pressure range slider o_venous_range_slider = {"container": o_treatmentAdjustmentPressures_Screen, "id": "_venousPressure" , "type": "PressureRangeSlider"} # venous progress o_venous_progress = {"container": o_venous_range_slider , "id": "_pressureRangeBar", "type": "RangeBar" } o_venous_progress_textMinimum = {"container": o_venous_progress , "id": "_textMinimum" , "type": "Text" } o_venous_progress_textMaximum = {"container": o_venous_progress , "id": "_textMaximum" , "type": "Text" } +o_venous_marker = {"container": o_venous_progress , "id": "_rangeMarkerValue", "type": "RangeMarker" } +o_venous_progress_textValue = {"container": o_venous_marker , "id": "_textValue" , "type": "Text" } # venous slider o_venous_slider = {"container": o_venous_range_slider , "id": "_pressureSlider" , "type": "RangeSlider" } -o_venous_slider_textMinimum = {"container": o_venous_slider , "id": "_textMinimum" , "type": "Text" } -o_venous_slider_textMaximum = {"container": o_venous_slider , "id": "_textMaximum" , "type": "Text" } +o_venous_limitbar = {"container": o_venous_range_slider , "id": "_rangeRect" , "type": "RangeRect" } +o_venous_limitbar_textMinimum = {"container": o_venous_limitbar , "id": "_textMinimum" , "type": "Text" } +o_venous_limitbar_textMaximum = {"container": o_venous_limitbar , "id": "_textMaximum" , "type": "Text" } Index: tst_HomeScreen/test.py =================================================================== diff -u -r393fd43e9a1cbf6b25a0f107928a051a622b2be2 -r2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24 --- tst_HomeScreen/test.py (.../test.py) (revision 393fd43e9a1cbf6b25a0f107928a051a622b2be2) +++ tst_HomeScreen/test.py (.../test.py) (revision 2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24) @@ -23,26 +23,26 @@ 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") - test.compare(str(waitForObjectExists(names.o_treatmentHome_createTreatment).text.text), "CREATE TREATMENT" , "SRSUI 532") + test.compare(str(waitForObjectExists(names.o_treatmentHome_startTreatment ).text.text), "START TREATMENT" , utils.SRSUI(24)) + test.compare(str(waitForObjectExists(names.o_treatmentHome_createTreatment).text.text), "CREATE TREATMENT" , utils.SRSUI(532)) test.compare( waitForObjectExists(names.o_mainMenu).visible, True) - test.compare(str(waitForObjectExists(names.o_mainMenu_treatment).text.text), "Treatment" , "SRSUI 534") - test.compare(str(waitForObjectExists(names.o_mainMenu_manager ).text.text), "Manager" , "SRSUI 026") - test.compare(str(waitForObjectExists(names.o_mainMenu_settings ).text.text), "Settings" , "SRSUI 028") + test.compare(str(waitForObjectExists(names.o_mainMenu_treatment).text.text), "Treatment" , utils.SRSUI(534)) + test.compare(str(waitForObjectExists(names.o_mainMenu_manager ).text.text), "Manager" , utils.SRSUI(26)) + test.compare(str(waitForObjectExists(names.o_mainMenu_settings ).text.text), "Settings" , utils.SRSUI(28)) utils.waitForGUI() mouseClick (waitForObjectExists(names.o_mainMenu_manager)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_managerHome ).visible, True , "SRSUI 027") + test.compare(waitForObjectExists(names.o_managerHome ).visible, True , utils.SRSUI(27)) mouseClick (waitForObjectExists(names.o_mainMenu_settings )) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_settingsHome ).visible, True , "SRSUI 029") + test.compare(waitForObjectExists(names.o_settingsHome ).visible, True , utils.SRSUI(29)) mouseClick (waitForObjectExists(names.o_mainMenu_treatment)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_treatmentHome).visible, True , "SRSUI 535") + test.compare(waitForObjectExists(names.o_treatmentHome).visible, True , utils.SRSUI(535)) utils.tstDone() Index: tst_ServiceShutdown/test.py =================================================================== diff -u -r393fd43e9a1cbf6b25a0f107928a051a622b2be2 -r2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24 --- tst_ServiceShutdown/test.py (.../test.py) (revision 393fd43e9a1cbf6b25a0f107928a051a622b2be2) +++ tst_ServiceShutdown/test.py (.../test.py) (revision 2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24) @@ -13,7 +13,7 @@ # import names -from dialin.squish import utils, globals, denaliMessages +from dialin.squish import utils, denaliMessages ################################################################################ @@ -23,19 +23,19 @@ def test_MainMenu_CurrentItem(vSRSUI=""): # test.compare(waitForObjectExists(names.o_mainMenu).currentIndex, 0) - test.compare(str(waitForObjectExists(names.o_mainMenu).currentTitle), "Treatment", globals.SRSUI(vSRSUI)) + test.compare(str(waitForObjectExists(names.o_mainMenu).currentTitle), "Treatment", utils.SRSUI(vSRSUI)) def gotoScreenNtest_Contains_PowerOffButton(vSRSUI=""): mouseClick (waitForObjectExists(names.o_mainMenu_settings)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_settingsHome).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_settingsHome).visible, True, utils.SRSUI(vSRSUI)) # the settings test page reverted back and it's no longer on the diagnostic page. #mouseClick(waitForObjectExists(names.o_diagnostics)) def gotoScreenNtest_Contains_TreatmentHome(vSRSUI=""): mouseClick (waitForObjectExists(names.o_mainMenu_treatment)) utils.waitForGUI() - test.compare(waitForObjectExists(names.o_treatmentHome).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_treatmentHome).visible, True, utils.SRSUI(vSRSUI)) def showNtest_PowerOffDialog(vSRSUI=""): denaliMessages.show_PowerOffDialog() @@ -46,7 +46,7 @@ test_PowerOffButton(vSRSUI) def showNtest_PowerOffNotificationDialog(vSRSUI=""): - mSRSUI = globals.SRSUI(vSRSUI) + mSRSUI = utils.SRSUI(vSRSUI) denaliMessages.show_PowerOffNotificationDialog() test.compare(str(waitForObjectExists(names.o_poweroff_notification).baseUrl.path), "/dialogs/AutoHideInfo.qml", mSRSUI + " - Dialog") constantPartOfTheMessage = "System is shutting down" @@ -55,7 +55,7 @@ utils.waitForGUI(1) # animation transition def showNtest_PowerOffRejectionDialog(vSRSUI=""): - mSRSUI = globals.SRSUI(vSRSUI) + mSRSUI = utils.SRSUI(vSRSUI) denaliMessages.show_PowerOffRejectionDialog() test.compare(str(waitForObjectExists(names.o_poweroff_rejection).baseUrl.path), "/dialogs/AutoHideInfo.qml", mSRSUI + " - Dialog") constantPartOfTheMessage = "Cannot shutdown during " # there might be the reason, concatenated at the end of the string. @@ -65,18 +65,18 @@ def test_PowerOffButton(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroffButton).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroffButton).visible, True, utils.SRSUI(vSRSUI)) def test_PowerOffDialog(vSRSUI=""): - test.compare(waitForObjectExists(names.o_modalDialog).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_modalDialog).visible, True, utils.SRSUI(vSRSUI)) def testNclick_ShutdownButton_onPowerOffConfirm(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroff_shutdown).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroff_shutdown).visible, True, utils.SRSUI(vSRSUI)) mouseClick (waitForObjectExists(names.o_poweroff_shutdown)) utils.waitForGUI (1) # Wait for the animation def testNclick_CancelButton_onPowerOffConfirm(vSRSUI=""): - test.compare(waitForObjectExists(names.o_poweroff_cancel).visible, True, globals.SRSUI(vSRSUI)) + test.compare(waitForObjectExists(names.o_poweroff_cancel).visible, True, utils.SRSUI(vSRSUI)) mouseClick (waitForObjectExists(names.o_poweroff_cancel)) utils.waitForGUI (1) # Wait for the animation @@ -92,7 +92,7 @@ test_MainMenu_CurrentItem(535) # 028 : The Home Screen shall display a "Settings" button. - test.compare(str(waitForObjectExists(names.o_mainMenu_settings).text.text), "Settings", globals.SRSUI(28)) + test.compare(str(waitForObjectExists(names.o_mainMenu_settings).text.text), "Settings", utils.SRSUI(28)) utils.waitForGUI() # 029 : Upon "Settings" button depress on the Home Screen; the UI shall navigate the user to the Device Settings Screen. Index: tst_Treatment_Adjustment_Pressures/test.py =================================================================== diff -u -refb0dcc34f39f35d41f43cca9667db17fd97c844 -r2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24 --- tst_Treatment_Adjustment_Pressures/test.py (.../test.py) (revision efb0dcc34f39f35d41f43cca9667db17fd97c844) +++ tst_Treatment_Adjustment_Pressures/test.py (.../test.py) (revision 2cebcfa1c6995bc48c71bcf7367e2695a8d1cb24) @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -## +# # # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # copyright # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, @@ -12,127 +12,188 @@ # author Behrouz NematiPour # -import names -from dialin.squish import utils, denaliMessages from dialin.common import Ranges +from dialin.squish import utils, denaliMessages +import names +inrangeColor = "#ffffff" + def gotoScreenNtest_Contains_PressuresSection(): - mouseClick(waitForObjectExists(names.o_treatmentHome_startTreatment)) + """ + clicks on the start treatment to go to the in-treatment screen and make sure the pressures section is present + """ + mouseClick (waitForObjectExists(names.o_treatmentHome_startTreatment)) utils.waitForGUI(1) test.compare(waitForObjectExists(names.o_treatmentStart_pressureTouchArea_TreatmentPressure).visible, True) def gotoScreenNTest_Adjustment(): - mouseClick(waitForObjectExists(names.o_treatmentStart_pressureTouchArea_TreatmentPressure)) + """ + clicks on the in-treatment pressures section and checks the Pressure adjustment screen pops up + and checks some items exist on the screen. + """ + mouseClick ( waitForObjectExists(names.o_treatmentStart_pressureTouchArea_TreatmentPressure)) utils.waitForGUI(1) - test.compare( waitForObjectExists(names.o_treatmentAdjustmentPressures_Screen ).visible, True ) - test.compare(str(waitForObjectExists(names.o_treatmentAdjustmentPressures_Screen_Title).text ), "PRESSURES") - test.compare( waitForObjectExists(names.o_arterial_progress ).visible, True ) - test.compare( waitForObjectExists(names.o_arterial_slider ).visible, True ) + test.compare( waitForObjectExists(names.o_treatmentAdjustmentPressures_Screen ).visible , True ) + test.compare(str(waitForObjectExists(names.o_treatmentAdjustmentPressures_Screen_Title ).text ), "PRESSURES" ) + test.compare( waitForObjectExists(names.o_arterial_progress ).visible , True ) + test.compare(str(waitForObjectExists(names.o_arterial_range_slider ).titleText), "Arterial" ) + test.compare( waitForObjectExists(names.o_arterial_slider ).visible , True ) + test.compare(str(waitForObjectExists(names.o_venous_range_slider ).titleText), "Venous" ) -def setNTest_Pressures_Value(vArterial, vVenous): - denaliMessages.setPressureOcclusionData(vArterial, vVenous, 0, 0, 0) - test.compare(waitForObjectExists(names.o_arterial_range_slider).value, vArterial) - test.compare(waitForObjectExists(names. o_venous_range_slider).value, vVenous ) +def test_pressure_limits_constants(): + """ + Checks for the PRS constant values that should have never change during application life cycle. + """ + test.compare( waitForObjectExists(names.o_arterial_range_slider ).minimum , Ranges.ARTERIAL_PRESSURE_MINIMUM ) + test.compare(str(waitForObjectExists(names.o_arterial_progress_textMinimum ).text ), str(Ranges.ARTERIAL_PRESSURE_MINIMUM)) + test.compare( waitForObjectExists(names.o_arterial_range_slider ).maximum , Ranges.ARTERIAL_PRESSURE_MAXIMUM ) + test.compare(str(waitForObjectExists(names.o_arterial_progress_textMaximum ).text ), str(Ranges.ARTERIAL_PRESSURE_MAXIMUM)) + + test.compare( waitForObjectExists(names.o_venous_range_slider ).minimum , Ranges.VENOUS_PRESSURE_MINIMUM ) + test.compare(str(waitForObjectExists(names.o_venous_progress_textMinimum ).text ), str(Ranges.VENOUS_PRESSURE_MINIMUM)) + test.compare( waitForObjectExists(names.o_venous_range_slider ).maximum , Ranges.VENOUS_PRESSURE_MAXIMUM ) + test.compare(str(waitForObjectExists(names.o_venous_progress_textMaximum ).text ), str(Ranges.VENOUS_PRESSURE_MAXIMUM)) -def setNTest_Pressures_Limits(): - # arterial constants shall never change regarding the PRS - denaliMessages.sendTreatmentAdjustPressuresLimitsResponse(False, 0, -200, -100, 100, 200) +def setNTest_Pressures_ValueColors(vArterial, vVenous): + """ + Checks the Pressures Values on each parameter change passed to the function + """ + denaliMessages.setPressureOcclusionData(vArterial, vVenous, 0, 0, 0) - test.compare(str(waitForObjectExists(names.o_arterial_range_slider ).titleText), "Arterial") - test.compare( waitForObjectExists(names.o_arterial_range_slider ).minimum , Ranges.ARTERIAL_PRESSURE_MINIMUM ) - test.compare(str(waitForObjectExists(names.o_arterial_progress_textMinimum ).text ), str(Ranges.ARTERIAL_PRESSURE_MINIMUM)) - test.compare( waitForObjectExists(names.o_arterial_range_slider ).maximum , Ranges.ARTERIAL_PRESSURE_MAXIMUM ) - test.compare(str(waitForObjectExists(names.o_arterial_progress_textMaximum ).text ), str(Ranges.ARTERIAL_PRESSURE_MAXIMUM)) + arterial_value = waitForObjectExists(names.o_arterial_marker ).value + venous_value = waitForObjectExists(names.o_venous_marker ).value + # get current limits to check the text value color. + arterial_limit_min = waitForObjectExists(names.o_arterial_limitbar).minimum + arterial_limit_max = waitForObjectExists(names.o_arterial_limitbar).maximum + venous_limit_min = waitForObjectExists(names.o_venous_limitbar ).minimum + venous_limit_max = waitForObjectExists(names.o_venous_limitbar ).maximum - test.compare(str(waitForObjectExists(names.o_venous_range_slider ).titleText), "Venous" ) - test.compare( waitForObjectExists(names.o_venous_range_slider ).minimum , Ranges.VENOUS_PRESSURE_MINIMUM ) - test.compare(str(waitForObjectExists(names.o_venous_progress_textMinimum ).text ), str(Ranges.VENOUS_PRESSURE_MINIMUM)) - test.compare( waitForObjectExists(names.o_venous_range_slider ).maximum , Ranges.VENOUS_PRESSURE_MAXIMUM ) - test.compare(str(waitForObjectExists(names.o_venous_progress_textMaximum ).text ), str(Ranges.VENOUS_PRESSURE_MAXIMUM)) + # arterial + test.compare( waitForObjectExists(names.o_arterial_range_slider ).value, vArterial) + test.compare(str(waitForObjectExists(names.o_arterial_progress_textValue).text), str(vArterial)) + if arterial_limit_min <= arterial_value <= arterial_limit_max: + # checked in range white since the out of range may be subject to change + test.compare(waitForObjectExists(names.o_arterial_progress_textValue).color.name, inrangeColor) - print("HERE") + # venous + test.compare( waitForObjectExists(names.o_venous_range_slider ).value, vVenous ) + test.compare(str(waitForObjectExists(names.o_venous_progress_textValue ).text), str(vVenous)) + if venous_limit_min <= venous_value <= venous_limit_max: + # checked in range white since the out of range may be subject to change + test.compare(waitForObjectExists(names.o_venous_progress_textValue).color.name, inrangeColor) + +def test_pressure_limits(vArterialLow, vArterialHigh, vVenousLow, vVenousHigh): + """ + Checks the Pressures Limits on each parameter change passed to the function + """ + # arterial + arterial_limit_min_text = str(waitForObjectExists(names.o_arterial_limitbar_textMinimum).text) + arterial_limit_min_value = waitForObjectExists(names.o_arterial_limitbar).minimum + arterial_limit_max_text = str(waitForObjectExists(names.o_arterial_limitbar_textMaximum).text) + arterial_limit_max_value = waitForObjectExists(names.o_arterial_limitbar).maximum + #venous + venous_limit_min_text = str(waitForObjectExists(names.o_venous_limitbar_textMinimum ).text) + venous_limit_min_value = waitForObjectExists(names.o_venous_limitbar ).minimum + venous_limit_max_text = str(waitForObjectExists(names.o_venous_limitbar_textMaximum ).text) + venous_limit_max_value = waitForObjectExists(names.o_venous_limitbar ).maximum + + test.compare(arterial_limit_min_text , str(vArterialLow )) + test.compare(arterial_limit_min_value , vArterialLow ) + test.compare(arterial_limit_max_text , str(vArterialHigh )) + test.compare(arterial_limit_max_value , vArterialHigh ) + test.compare(venous_limit_min_text , str(vVenousLow )) + test.compare(venous_limit_min_value , vVenousLow ) + test.compare(venous_limit_max_text , str(vVenousHigh )) + test.compare(venous_limit_max_value , vVenousHigh ) + +def setNTest_Pressures_Limits(vArterialLow, vArterialHigh, vVenousLow, vVenousHigh): + """ + uses the pressures limits and checks if they change correctly by using the function test_pressure_limits + """ + # arterial constants shall never change regarding the PRS + # it has to be set to reject otherwise the dialog is closed. + # the accept and dialog close has been tested somewhere else. + denaliMessages.sendTreatmentAdjustPressuresLimitsResponse(False, 0, vArterialLow, vArterialHigh, vVenousLow, vVenousHigh) + test_pressure_limits(vArterialLow, vArterialHigh, vVenousLow, vVenousHigh) + + +def confirm_accept(): + """ + checks if confirm touched and accepted response received it closes the adjustment dialog. + """ + arterialLow = Ranges.ARTERIAL_PRESSURE_LOW_DEF + arterialHigh = Ranges.ARTERIAL_PRESSURE_HIGH_DEF + venousLow = Ranges.VENOUS_PRESSURE_LOW_DEF + venousHigh = Ranges.VENOUS_PRESSURE_HIGH_DEF + test.compare(waitForObjectExists(names.o_treatmentAdjustmentPressures_Screen).visible, True) + denaliMessages.sendTreatmentAdjustPressuresLimitsResponse( + True, 0, + arterialLow , + arterialHigh , + venousLow , + venousHigh + ) + utils.waitForGUI(1) + test.compare(utils.isVisible(object, names.o_treatmentAdjustmentPressures_Screen), False) + def confirm_request(): - if waitForObjectExists(names.o_confirmButton).visible: - mouseClick(waitForObjectExists(names.o_confirmButton)) - else: - test.compare(True, False,"No Confirm button on the screen") + mouseClick ( waitForObjectExists(names.o_confirmButton)) - def main(): utils.tstStart(__file__) - + startApplication(names.AUT_NAME + " -q") utils.waitForGUI(1) - + gotoScreenNtest_Contains_PressuresSection() - utils.waitForGUI(1) - gotoScreenNTest_Adjustment() - - confirm_request() - - setNTest_Pressures_Limits() - setNTest_Pressures_Value(0, 0) + test_pressure_limits_constants() + + # checking the on going values of the pressures. + # checks the initial values of zero + setNTest_Pressures_ValueColors(0, 0) + #checks the ranges of values. + for arterial in range(Ranges.ARTERIAL_PRESSURE_MINIMUM , Ranges.ARTERIAL_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(arterial, 0 ) + for venous in range(Ranges.VENOUS_PRESSURE_MINIMUM , Ranges.VENOUS_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(0 , venous) + + + # checking the limit change + setNTest_Pressures_Limits(#-300, +100, -100, +400 + Ranges.ARTERIAL_PRESSURE_LOW_DEF , + Ranges.ARTERIAL_PRESSURE_HIGH_DEF , + Ranges.VENOUS_PRESSURE_LOW_DEF , + Ranges.VENOUS_PRESSURE_HIGH_DEF + ) - for arterial in range(Ranges.ARTERIAL_PRESSURE_MINIMUM , Ranges.ARTERIAL_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS): - setNTest_Pressures_Value(arterial, 0 ) - for venous in range(Ranges.VENOUS_PRESSURE_MINIMUM , Ranges.VENOUS_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS): - setNTest_Pressures_Value(0 , venous) - - - -# gotoScreenNTest_Adjustment() + # changed the ranges + setNTest_Pressures_Limits( -200, -100, +200, +500 ) + # checks the ranges of values. + for arterial in range(Ranges.ARTERIAL_PRESSURE_MINIMUM , Ranges.ARTERIAL_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(arterial, 0 ) + for venous in range(Ranges.VENOUS_PRESSURE_MINIMUM , Ranges.VENOUS_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(0 , venous) -# utils.waitForGUI(1) -# -# denaliMessages.setTreatmentParamRanges(0, 0, 0, 0, 150, 550) -# denaliMessages.send_acknowledge_UI() -# -# mouseClick(waitForObject(names.o_bloodFlowSlider_Slider), 190, 4, Qt.LeftButton) -# mouseClick(waitForObject(names.o_dialysateFlowSlider_Slider), 79, 5, Qt.LeftButton) -# -# test.compare(waitForObjectExists(names.o_bloodFlowSlider_Slider).value, 225) -# test.compare(waitForObjectExists(names.o_dialysateFlowSlider_Slider).value, 200) -# -# # sendTreatmentAdjustBloodDialysateRequest -# 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_confirmButton)) -# denaliMessages.waitForMessageToBeSent() -# denaliMessages.send_acknowledge_HD() -# -# denaliMessages.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage -# denaliMessages.sendTreatmentAdjustBloodDialysateResponse(0, 3, 125, 150) # coverage -# denaliMessages.sendTreatmentAdjustBloodDialysateResponse(0, 3, 175, 250) -# utils.waitForGUI(2) -# -# mouseClick(waitForObject(names.o_bloodFlowSlider_Slider), 190, 4, Qt.LeftButton) -# mouseClick(waitForObject(names.o_dialysateFlowSlider_Slider), 79, 5, Qt.LeftButton) -# -# test.compare(waitForObjectExists(names.o_bloodFlowSlider_Slider).value, 225) -# test.compare(waitForObjectExists(names.o_dialysateFlowSlider_Slider).value, 200) -# -# denaliMessages.sendTreatmentAdjustBloodDialysateResponse(1, 0, -# waitForObjectExists(names.o_bloodFlowSlider_Slider).value, -# waitForObjectExists(names.o_dialysateFlowSlider_Slider).value -# ) -# denaliMessages.setTreatmentBloodFlowRate(225, 1, 1, 1, 1, 1, 1) -# denaliMessages.setTreatmentDialysateFlowRate(200, 0, 0, 0, 0, 0, 0) -# -# test.compare(str(waitForObjectExists(names.o_treatmentStart_225_Text).text), "225") -# test.compare(str(waitForObjectExists(names.o_treatmentStart_200_Text).text), "200") + # changed the ranges + setNTest_Pressures_Limits( -100, +200, 0, +300 ) + # checks the ranges of values. + for arterial in range(Ranges.ARTERIAL_PRESSURE_MINIMUM , Ranges.ARTERIAL_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(arterial, 0 ) + for venous in range(Ranges.VENOUS_PRESSURE_MINIMUM , Ranges.VENOUS_PRESSURE_MAXIMUM + Ranges.PRESSURE_STEPS, Ranges.PRESSURE_STEPS * 10): + setNTest_Pressures_ValueColors(0 , venous) + confirm_request() + confirm_accept() + utils.tstDone() - +