Index: shared/scripts/names.py =================================================================== diff -u -rd53166805a654f22111b6af975018b61520dfdba -rb465db1ba597c4ec337caf73e1a862e82b19f8a8 --- shared/scripts/names.py (.../names.py) (revision d53166805a654f22111b6af975018b61520dfdba) +++ shared/scripts/names.py (.../names.py) (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -159,5 +159,30 @@ +# Settings Load Cell Readings +o_settingsHome_reservoir1Prim = {"container": o_settingsHome, "objectName": "_LoadCellReadings0", "type": "Text"} +o_settingsHome_reservoir1Bkup = {"container": o_settingsHome, "objectName": "_LoadCellReadings1", "type": "Text"} +o_settingsHome_reservoir2Prim = {"container": o_settingsHome, "objectName": "_LoadCellReadings2", "type": "Text"} +o_settingsHome_reservoir2Bkup = {"container": o_settingsHome, "objectName": "_LoadCellReadings3", "type": "Text"} +# Settings Temperature Sensors +o_settingsHome_inletPrimaryHeater = {"container": o_settingsHome, "objectName": "_TemperatureSensors0" , "type": "Text"} +o_settingsHome_outletPrimaryHeater = {"container": o_settingsHome, "objectName": "_TemperatureSensors1" , "type": "Text"} +o_settingsHome_conductivitySensor1 = {"container": o_settingsHome, "objectName": "_TemperatureSensors2" , "type": "Text"} +o_settingsHome_conductivitySensor2 = {"container": o_settingsHome, "objectName": "_TemperatureSensors3" , "type": "Text"} +o_settingsHome_outletRedundancy = {"container": o_settingsHome, "objectName": "_TemperatureSensors4" , "type": "Text"} +o_settingsHome_inletDialysate = {"container": o_settingsHome, "objectName": "_TemperatureSensors5" , "type": "Text"} +o_settingsHome_primaryHeaterThermoCouple = {"container": o_settingsHome, "objectName": "_TemperatureSensors6" , "type": "Text"} +o_settingsHome_trimmerHeaterThermoCouple = {"container": o_settingsHome, "objectName": "_TemperatureSensors7" , "type": "Text"} +o_settingsHome_primaryHeaterColdJunction = {"container": o_settingsHome, "objectName": "_TemperatureSensors8" , "type": "Text"} +o_settingsHome_trimmerHeaterColdJunction = {"container": o_settingsHome, "objectName": "_TemperatureSensors9" , "type": "Text"} +o_settingsHome_primaryHeaterInternal = {"container": o_settingsHome, "objectName": "_TemperatureSensors10", "type": "Text"} +o_settingsHome_trimmerHeaterInternal = {"container": o_settingsHome, "objectName": "_TemperatureSensors11", "type": "Text"} +# Setting CANBusFaultCountText +o_settingsHome_canbusFaultCount = {"container": o_settingsHome, "id": "_canbusFaultCountText", "type": "Text" } + + + + + Index: suite.conf =================================================================== diff -u -rb795e6250294344ef7b0396bae4648fb2aa306b3 -rb465db1ba597c4ec337caf73e1a862e82b19f8a8 --- suite.conf (.../suite.conf) (revision b795e6250294344ef7b0396bae4648fb2aa306b3) +++ suite.conf (.../suite.conf) (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -5,6 +5,6 @@ IMPLICITAUTSTART=0 LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_Internals tst_HomeScreen tst_ServiceShutdown tst_TreatmentScreen tst_Treatment_Section_BloodDialysate tst_Treatment_BloodFlowRate tst_Treatment_DialysateFlowRate tst_Treatment_Time tst_Treatment_Ultrafiltration tst_Treatment_PressureOcclusion tst_Treatment_ParametersRange tst_Treatment_Adjustment_BloodDialysate tst_Treatment_Adjustment_Duration tst_Treatment_Adjustment_Ultrafiltration tst_Alarm +TEST_CASES=tst_Internals tst_HomeScreen tst_ServiceShutdown tst_TreatmentScreen tst_Treatment_Section_BloodDialysate tst_Treatment_BloodFlowRate tst_Treatment_DialysateFlowRate tst_Treatment_Time tst_Treatment_Ultrafiltration tst_Treatment_PressureOcclusion tst_Treatment_LoadCellReadings tst_Treatment_TemperatureSensors tst_Treatment_ParametersRange tst_Treatment_Adjustment_BloodDialysate tst_Treatment_Adjustment_Duration tst_Treatment_Adjustment_Ultrafiltration tst_CANBusFaultCount tst_Alarm VERSION=3 WRAPPERS=Qt Index: tst_CANBusFaultCount/test.py =================================================================== diff -u --- tst_CANBusFaultCount/test.py (revision 0) +++ tst_CANBusFaultCount/test.py (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -0,0 +1,53 @@ +# -*- 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_CANBusFaultCount +# date 2020/06/21 +# author Behrouz NematiPour +# + +import names +import utils +import denaliMessages + +def gotoScreenNtest_Contains_CANBusFaultCount(): + mouseClick(waitForObject(names.o_mainMenu_settings)) + test_values(0) + + + +def test_values(vCount): + test.compare(str(waitForObjectExists(names.o_settingsHome_canbusFaultCount).text), "CAN Faults : {}".format(vCount)) + +def main(): + utils.tstStart() + + startApplication("denaliSquish") + utils.waitForGUI(1) + + gotoScreenNtest_Contains_CANBusFaultCount() + utils.waitForGUI(1) + + denaliMessages.setCanBUSFaultCount(10) + test_values (10) + + + denaliMessages.setCanBUSFaultCount(100) + test_values (100) + + denaliMessages.setCanBUSFaultCount(100) # Coverage + test_values (100) + + + + denaliMessages.setCanBUSFaultCount(0) + test_values (0) + + utils.tstDone() + Index: tst_Treatment_Adjustment_BloodDialysate/test.py =================================================================== diff -u -rd53166805a654f22111b6af975018b61520dfdba -rb465db1ba597c4ec337caf73e1a862e82b19f8a8 --- tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision d53166805a654f22111b6af975018b61520dfdba) +++ tst_Treatment_Adjustment_BloodDialysate/test.py (.../test.py) (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -27,7 +27,7 @@ def main(): utils.tstStart() - startApplication("denaliSquish") # + startApplication("denaliSquish") utils.waitForGUI(1) gotoScreenNtest_Contains_FlowsSection() Index: tst_Treatment_Adjustment_Ultrafiltration/test.py =================================================================== diff -u -rd53166805a654f22111b6af975018b61520dfdba -rb465db1ba597c4ec337caf73e1a862e82b19f8a8 --- tst_Treatment_Adjustment_Ultrafiltration/test.py (.../test.py) (revision d53166805a654f22111b6af975018b61520dfdba) +++ tst_Treatment_Adjustment_Ultrafiltration/test.py (.../test.py) (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -172,7 +172,7 @@ def next_Clicked(): - mouseClick(waitForObject(names.o_treatmentAdjustmentUltrafiltrationEdit_NextButton)) + mouseClick(waitForObject(o_treatmentAdjustmentUltrafiltrationEdit_NextButton)) def adjustmentResponse(): @@ -299,6 +299,12 @@ test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_NotificationBar).text ), "REQUEST_REJECT_REASON_TIMEOUT_WAITING_FOR_USER_CONFIRM") +def confirm_RejectNTest_Unknow(): + denaliMessages.setTreatmentAdjustUltrafiltrationConfirmRejected(200) + test.compare( waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_NotificationBar).visible, True) + test.compare(str(waitForObjectExists(o_treatmentAdjustmentUltrafiltrationConfirm_NotificationBar).text ), "[200] Unknown Error") + + def confirm_Accept(vVolume, vDuration, vRate): denaliMessages.setTreatmentAdjustUltrafiltrationConfirmResponse(1, 0, vVolume, vDuration, vRate) @@ -370,6 +376,7 @@ updateNTest_Adjustment_Ranges(100, 4800) user_Adjusted() + next_Clicked() next_Accepted(2400, eIncrease, eIncrease) back_Clicked() @@ -449,12 +456,12 @@ # options request next_Accepted(4800, eIncrease, eIncrease) confirm_Request_Duration() - confirm_RejectNTest() + confirm_RejectNTest_Unknow() confirm_Accept(1200, 2 *60, 20) - - + test.compare(utils.l2ml(waitForObjectExists(o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).maximum), 1200) + utils.tstDone() Index: tst_Treatment_LoadCellReadings/test.py =================================================================== diff -u --- tst_Treatment_LoadCellReadings/test.py (revision 0) +++ tst_Treatment_LoadCellReadings/test.py (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -0,0 +1,56 @@ +# -*- 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_LoadCellReadings +# date 2020/06/21 +# author Behrouz NematiPour +# + +import names +import utils +import denaliMessages + +def gotoScreenNtest_Contains_LoadCellReadings(): + mouseClick(waitForObject(names.o_mainMenu_settings)) + test_values(0, 0, 0, 0) + + + +def test_values(vRs1Prim, vRs1Bkup, vRs2Prim, vRs2Bkup): + test.compare(str(waitForObjectExists(names.o_settingsHome_reservoir1Prim).text), "{:.2f}".format(vRs1Prim)) + test.compare(str(waitForObjectExists(names.o_settingsHome_reservoir1Bkup).text), "{:.2f}".format(vRs1Bkup)) + test.compare(str(waitForObjectExists(names.o_settingsHome_reservoir2Prim).text), "{:.2f}".format(vRs2Prim)) + test.compare(str(waitForObjectExists(names.o_settingsHome_reservoir2Bkup).text), "{:.2f}".format(vRs2Bkup)) + +def main(): + utils.tstStart() + + startApplication("denaliSquish") + utils.waitForGUI(1) + + gotoScreenNtest_Contains_LoadCellReadings() + utils.waitForGUI(1) + + denaliMessages.setTreatmentLoadCellReadings(10, 20, 30, 40) + test_values (10, 20, 30, 40) + + + denaliMessages.setTreatmentLoadCellReadings(100, 200, 300, 400) + test_values (100, 200, 300, 400) + + denaliMessages.setTreatmentLoadCellReadings(100, 200, 300, 400) # Coverage + test_values (100, 200, 300, 400) + + + + denaliMessages.setTreatmentLoadCellReadings(0, 0, 0, 0) + test_values (0, 0, 0, 0) + + utils.tstDone() + Index: tst_Treatment_TemperatureSensors/test.py =================================================================== diff -u --- tst_Treatment_TemperatureSensors/test.py (revision 0) +++ tst_Treatment_TemperatureSensors/test.py (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -0,0 +1,59 @@ +# -*- 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_TemperatureSensors +# date 2020/06/21 +# author Behrouz NematiPour +# + +import names +import utils +import denaliMessages + +def gotoScreenNtest_Contains_TemperatureSensors(): + mouseClick(waitForObject(names.o_mainMenu_settings)) + +def test_values(vInletPrimaryHeater, vOutletPrimaryHeater, vConductivitySensor1, vConductivitySensor2, vOutletRedundancy, vInletDialysate, vPrimaryHeaterThermoCouple, vPrimmerHeaterThermoCouple, vPrimaryHeaterColdJunction, vTrimmerHeaterColdJunction, vTrimaryHeaterInternal ,vTrimmerHeaterInternal): + test.compare(str(waitForObjectExists(names.o_settingsHome_inletPrimaryHeater ).text), "{:.2f}".format(vInletPrimaryHeater )) + test.compare(str(waitForObjectExists(names.o_settingsHome_outletPrimaryHeater ).text), "{:.2f}".format(vOutletPrimaryHeater )) + test.compare(str(waitForObjectExists(names.o_settingsHome_conductivitySensor1 ).text), "{:.2f}".format(vConductivitySensor1 )) + test.compare(str(waitForObjectExists(names.o_settingsHome_conductivitySensor2 ).text), "{:.2f}".format(vConductivitySensor2 )) + test.compare(str(waitForObjectExists(names.o_settingsHome_outletRedundancy ).text), "{:.2f}".format(vOutletRedundancy )) + test.compare(str(waitForObjectExists(names.o_settingsHome_inletDialysate ).text), "{:.2f}".format(vInletDialysate )) + test.compare(str(waitForObjectExists(names.o_settingsHome_primaryHeaterThermoCouple).text), "{:.2f}".format(vPrimaryHeaterThermoCouple)) + test.compare(str(waitForObjectExists(names.o_settingsHome_trimmerHeaterThermoCouple).text), "{:.2f}".format(vPrimmerHeaterThermoCouple)) + test.compare(str(waitForObjectExists(names.o_settingsHome_primaryHeaterColdJunction).text), "{:.2f}".format(vPrimaryHeaterColdJunction)) + test.compare(str(waitForObjectExists(names.o_settingsHome_trimmerHeaterColdJunction).text), "{:.2f}".format(vTrimmerHeaterColdJunction)) + test.compare(str(waitForObjectExists(names.o_settingsHome_primaryHeaterInternal ).text), "{:.2f}".format(vTrimaryHeaterInternal )) + test.compare(str(waitForObjectExists(names.o_settingsHome_trimmerHeaterInternal ).text), "{:.2f}".format(vTrimmerHeaterInternal )) + + +def main(): + utils.tstStart() + + startApplication("denaliSquish") + utils.waitForGUI(1) + + gotoScreenNtest_Contains_TemperatureSensors() + utils.waitForGUI(1) + + denaliMessages.setTreatmentTemperatureSensors(10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65) + test_values (10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65) + + denaliMessages.setTreatmentTemperatureSensors(100, 151, 202, 253, 304, 355, 406, 457, 508, 559, 610, 611) + test_values (100, 151, 202, 253, 304, 355, 406, 457, 508, 559, 610, 611) + + denaliMessages.setTreatmentTemperatureSensors(100, 151, 202, 253, 304, 355, 406, 457, 508, 559, 610, 611) # Coverage + test_values (100, 151, 202, 253, 304, 355, 406, 457, 508, 559, 610, 611) + + denaliMessages.setTreatmentTemperatureSensors(0,0,0,0,0,0,0,0,0,0,0,0) + test_values (0,0,0,0,0,0,0,0,0,0,0,0) + + utils.tstDone() + Index: tst_Treatment_Ultrafiltration/test.py =================================================================== diff -u -rb795e6250294344ef7b0396bae4648fb2aa306b3 -rb465db1ba597c4ec337caf73e1a862e82b19f8a8 --- tst_Treatment_Ultrafiltration/test.py (.../test.py) (revision b795e6250294344ef7b0396bae4648fb2aa306b3) +++ tst_Treatment_Ultrafiltration/test.py (.../test.py) (revision b465db1ba597c4ec337caf73e1a862e82b19f8a8) @@ -12,9 +12,9 @@ # author Behrouz NematiPour # -import names +import names import utils -import denaliMessages +import denaliMessages def gotoScreenNtest_Contains_Ultrafiltration(): mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) @@ -24,7 +24,13 @@ for i in range(vMinUF, vMaxUF+1, 10): denaliMessages.setTreatmentUltrafiltration(vMaxUF, i, 1, 1, 1, 1, 1) test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).value), i) + + +def resetNTestTreatmentUltrafiltration(): + denaliMessages.setTreatmentUltrafiltration(0, 0, 0, 0, 0, 0, 0) + test.compare(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).value, 0) + def main(): utils.tstStart() @@ -33,14 +39,24 @@ gotoScreenNtest_Contains_Ultrafiltration() utils.waitForGUI(1) - - minUF = 0 + + minUF = 0 maxUF = 600 - denaliMessages.send_acknowledge_UI() test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).minimum), minUF) test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).maximum), maxUF) + + resetNTestTreatmentUltrafiltration() startNTestTreatmentUltrafiltration(minUF, maxUF) + + + maxUF = 300 + denaliMessages.setTreatmentAdjustUltrafiltrationConfirmResponse(1, 0, maxUF, 30, 5) + test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).minimum), minUF) + test.compare(utils.l2ml(waitForObjectExists(names.o_treatmentStart_ultrafiltrationTouchArea_TreatmentUltrafiltration).maximum), maxUF) + + resetNTestTreatmentUltrafiltration() + startNTestTreatmentUltrafiltration(minUF, maxUF) + utils.tstDone() - \ No newline at end of file