Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -rc66984223fbddf94471842ba879cfe6cffb83640 -r27ae7dca3c68d5c05f14db44bc5fc9ab69dcdb59 --- suite_leahi/shared/scripts/names.py (.../names.py) (revision c66984223fbddf94471842ba879cfe6cffb83640) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 27ae7dca3c68d5c05f14db44bc5fc9ab69dcdb59) @@ -2,13 +2,14 @@ from objectmaphelper import * -o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} -standByScreen_MainHome = {"container": o_Gui_MainView, "objectName": "standByScreen", "type": "MainHome", "visible": True} -treatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} -startTreatmentButton = {"container": standByScreen_MainHome, "id": "_startTreatmentRect", "type": "TouchRect", "unnamed": 1, "visible": True} -mainTreatmentScreen = {"container": treatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} -startFluidButton = {"container": mainTreatmentScreen, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1, "visible": True} -totalSalineDelivered_Text = {"container": mainTreatmentScreen, "text": "Total Saline Delivered", "type": "Text", "unnamed": 1, "visible": True} -deliveringSaline_Text = {"container": mainTreatmentScreen, "text": "Delivering Saline", "type": "Text", "unnamed": 1, "visible": True} -currentBolusVolume = {"container": mainTreatmentScreen, "text": 75, "type": "Label", "unnamed": 1, "visible": True} -treatmentSaline = {"container": mainTreatmentScreen, "objectName": "treatmentSaline", "type": "TreatmentSaline", "visible": True} +o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +standByScreen_MainHome = {"container": o_Gui_MainView, "type": "MainHome", "visible": True} +treatmentStack = {"container": o_Gui_MainView, "type": "TreatmentStack", "visible": True} +startTreatmentButton = {"container": standByScreen_MainHome, "id": "_startTreatmentRect", "type": "TouchRect", "unnamed": 1, "visible": True} +mainTreatmentScreen = {"container": treatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} +startFluidButton = {"container": mainTreatmentScreen, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1, "visible": True} +totalSalineDelivered_Text = {"container": mainTreatmentScreen, "text": "Total Saline Delivered", "type": "Text", "unnamed": 1, "visible": True} +deliveringSaline_Text = {"container": mainTreatmentScreen, "text": "Delivering Saline", "type": "Text", "unnamed": 1, "visible": True} +currentBolusVolume = {"container": mainTreatmentScreen, "text": 75, "type": "Label", "unnamed": 1, "visible": True} +treatmentSaline = {"container": mainTreatmentScreen, "objectName": "treatmentSaline", "type": "TreatmentSaline", "visible": True} +salineProgressBar = {"container": mainTreatmentScreen, "id": "_fluidProgressBar", "type": "ProgressBar", "unnamed": 1, "visible": True} Index: suite_leahi/tst_solution_infusion/test.py =================================================================== diff -u -rc66984223fbddf94471842ba879cfe6cffb83640 -r27ae7dca3c68d5c05f14db44bc5fc9ab69dcdb59 --- suite_leahi/tst_solution_infusion/test.py (.../test.py) (revision c66984223fbddf94471842ba879cfe6cffb83640) +++ suite_leahi/tst_solution_infusion/test.py (.../test.py) (revision 27ae7dca3c68d5c05f14db44bc5fc9ab69dcdb59) @@ -48,20 +48,20 @@ salineTextObj = waitForObject(names.totalSalineDelivered_Text) test.compare(salineTextObj.text, "Total Saline Delivered") - # verify send bolus req message + # verify send start bolus req message mouseClick(waitForObject(names.startFluidButton)) test.verify(waitFor("'salineBolusStartState == 1'", 5000)) td_interface.td_tx_state( - TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value , - 0 , + TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value , 0 , - 0 , - 0 , - 0 , - 0 , - 0 , - 2 , # saline in progess + 0 , + 0 , + 0 , + 0 , + 0 , + 0 , + 2 , # saline in progess 0 ) @@ -74,22 +74,41 @@ test.compare(salineDeliveryTextObj.text, "Delivering Saline") # verify saline data - currentBolus = 75 + bolusValueInTest = 75 td_interface.td_saline( 100 , # target_volume 150 , # cumulative_volume - currentBolus , # bolus_volume + bolusValueInTest, # bolus_volume 0 ) # verify saline text currentBolusTextObj = waitForObject(names.currentBolusVolume) - test.compare(currentBolusTextObj.text, str(currentBolus)) + test.compare(currentBolusTextObj.text, str(bolusValueInTest)) - # verify send bolus req message + # verify progress bar + progressBarObj = waitForObject(names.salineProgressBar) + test.compare(progressBarObj.value, bolusValueInTest) + + # verify send stop bolus req message mouseClick(waitForObject(names.startFluidButton)) test.verify(waitFor("'salineBolusStartState == 0'", 5000)) + td_interface.td_tx_state( + TDTreatmentStates.TREATMENT_DIALYSIS_STATE.value , + 0 , + 0 , + 0 , + 0 , + 0 , + 0 , + 0 , + 0 , # saline in idle + 0 + ) + + # verify progress bar set off + test.compare(progressBarObj.value, 0) # handler for messages from UI to FW def handle_solution_infusion_request( message, timestamp = 0.0):