Index: suite_leahi/shared/scripts/names.py
===================================================================
diff -u -r3c058b92591ff8a31fbe80d8df985d822c8b8698 -r88cc7fe95f2dccaf433dae76aa929a4568795102
--- suite_leahi/shared/scripts/names.py (.../names.py) (revision 3c058b92591ff8a31fbe80d8df985d822c8b8698)
+++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 88cc7fe95f2dccaf433dae76aa929a4568795102)
@@ -10,7 +10,6 @@
o_Overlay = {"container": o_QQuickView, "type": "Overlay" }
o_standByScreen_MainHome = {"container": o_Gui_MainView, "type": "MainHome" }
treatmentStack = {"container": o_Gui_MainView, "type": "TreatmentStack" }
-startTreatmentButton = {"container": o_Gui_MainView, "id": "_startTreatmentRect", "type": "TouchRect", "unnamed": 1 }
mainTreatmentScreen = {"container": treatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1 }
startFluidButton = {"container": mainTreatmentScreen, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1 }
salineDeliveredText = {"container": mainTreatmentScreen, "objectName": "salineDescriptionText", "type": "Text" }
Index: suite_leahi/tst_solution_infusion/test.py
===================================================================
diff -u -r393f779c6680227ca71bd58a36148443e436cf53 -r88cc7fe95f2dccaf433dae76aa929a4568795102
--- suite_leahi/tst_solution_infusion/test.py (.../test.py) (revision 393f779c6680227ca71bd58a36148443e436cf53)
+++ suite_leahi/tst_solution_infusion/test.py (.../test.py) (revision 88cc7fe95f2dccaf433dae76aa929a4568795102)
@@ -39,19 +39,31 @@
td_interface.td_operation_mode( TDOpModes.MODE_STAN.value, 0 )
# verify Standby screen
- test.verify(waitForObjectExists(names.standByScreen_MainHome), "In Standby")
- mouseClick(waitForObject(names.startTreatmentButton))
+ test.verify(waitForObjectExists(names.o_standByScreen_MainHome), "In Standby")
+ td_interface.td_operation_mode( TDOpModes.MODE_TREA.value, 0 )
+ td_interface.td_tx_state(
+ TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0 ,
+ 0
+ )
# verify main treatment screen
test.verify(waitForObjectExists(names.mainTreatmentScreen), "In Main Treatment")
# verify saline text
salineTextObj = waitForObject(names.salineDeliveredText)
- test.compare(salineTextObj.text, "Total Saline Delivered")
+ test.compare(salineTextObj.text, "Total Saline Delivered", "Testing 'Total Saline Delivered' text")
# verify send start bolus req message
mouseClick(waitForObject(names.startFluidButton))
- test.verify(waitFor("'salineBolusStartState == 1'", 5000))
+ test.verify(waitFor("'salineBolusStartState == 1'", 5000), "Testing UI -> TD message start bolus")
# change state to in progress
td_interface.td_tx_state(
@@ -69,10 +81,10 @@
# verify isStarted property binding to vTDTreatmentStates.sbRunning
treatmentSaline = waitForObject(names.treatmentSaline)
- test.compare(treatmentSaline.isStarted, True)
+ test.compare(treatmentSaline.isStarted, True, "Testing vTDTreatmentStates.sbRunning")
# verify text
- test.compare(salineTextObj.text, "Delivering Saline")
+ test.compare(salineTextObj.text, "Delivering Saline", "Testing Saline Description text")
# verify saline data
bolusValueInTest = 75
@@ -85,15 +97,15 @@
# verify saline text
currentBolusTextObj = waitForObject(names.currentBolusVolume)
- test.compare(currentBolusTextObj.text, str(bolusValueInTest))
+ test.compare(currentBolusTextObj.text, str(bolusValueInTest), "Testing current bolus value text")
# verify progress bar
progressBarObj = waitForObject(names.salineProgressBar)
- test.compare(progressBarObj.value, bolusValueInTest)
+ test.compare(progressBarObj.value, bolusValueInTest, "Testing progress bar current bolus value")
# verify send stop bolus req message
mouseClick(waitForObject(names.startFluidButton))
- test.verify(waitFor("'salineBolusStartState == 0'", 5000))
+ test.verify(waitFor("'salineBolusStartState == 0'", 5000), "Testing UI -> TD message stop bolus")
# change state to idle
td_interface.td_tx_state(
@@ -110,7 +122,7 @@
)
# verify progress bar set off
- test.compare(progressBarObj.value, 0)
+ test.compare(progressBarObj.value, 0, "Testing progress bar bolus off")
# handler for messages from UI to FW
def handle_solution_infusion_request( message, timestamp = 0.0):