Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r6008f9330e1369fc6389162dabaf752b4ca704f8 -r24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 6008f9330e1369fc6389162dabaf752b4ca704f8) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192) @@ -102,7 +102,7 @@ HEPARIN_RESUME_DELIVERY_TEXT = "RESUME DELIVERY" HEPARIN_BOLUS_ACTIVE_TEXT = "Bolus Active" HEPARIN_BOLUS_DISPENSING_TEXT = "Dispensing Active" -HEPARIN_PAUSE_DELIVERY_TEXT = "PAUSE DELIVERY" +HEPARIN_PAUSE_DELIVERY_TEXT = "PAUSE HEPARIN" HEPARIN_MAXIMUM_VOLUME_DELIVERED_TEXT = "Maximum Cumulative Heparin Volume Delivered" HEPARIN_SYRINGE_EMPTY_TEXT = "Syringe Empty" HEPARIN_DISPENSING_RATE = "Heparin Dispensing Rate" Index: shared/scripts/names.py =================================================================== diff -u -r6008f9330e1369fc6389162dabaf752b4ca704f8 -r24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192 --- shared/scripts/names.py (.../names.py) (revision 6008f9330e1369fc6389162dabaf752b4ca704f8) +++ shared/scripts/names.py (.../names.py) (revision 24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192) @@ -371,11 +371,10 @@ o_treatmentStart_HeparinSection = {"container": o_treatmentStart_TreatmentStart , "id": "_heparinTouchArea", "type": "TreatmentFluid" } # Heparin_Messages_on_Button -o_treatmentStart_HeparinSection_FluidButton = {"container": o_treatmentStart_HeparinSection, "id": "_startFluidButton", "type": "TouchRect"} o_state0_heparin_delivery_Off_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "OFF", "type": "Text", "unnamed": 1, "visible": True} o_state1_heparin_delivery_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "HEPARIN DELIVERY", "type": "Text", "unnamed": 1, "visible": True} o_state2_heparin_state_paused_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "RESUME DELIVERY", "type": "Text", "unnamed": 1, "visible": True} -o_state4_heparin_state_dispensing_text = {"container": o_treatmentStart_HeparinSection_FluidButton, "id": "_text", "text": "PAUSE DELIVERY", "type": "Text", "visible": True} +o_state4_heparin_state_dispensing_text = {"container": o_treatmentHome, "text": "PAUSE HEPARIN", "type": "Text", "visible": True} # Heparin_Statewise_Messages o_state_one_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Delivery Stopped", "type": "Text", "unnamed": 1, "visible": True} @@ -386,6 +385,7 @@ o_state6_heparin_state_empty_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Syringe Empty", "type": "Text", "unnamed": 1, "visible": True} # Heparin Rejection Message +o_heparin_rejection_textLabel = {"container": o_treatmentHome, "type": "Text", "unnamed": 1, "visible": True} o_rejection_msg = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} o_volume_delivered_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "occurrence": 2, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} Index: tst_main_treatment_heparin/test.py =================================================================== diff -u -r6bb43117bca2673c5de877f5b70b094da344418a -r24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192 --- tst_main_treatment_heparin/test.py (.../test.py) (revision 6bb43117bca2673c5de877f5b70b094da344418a) +++ tst_main_treatment_heparin/test.py (.../test.py) (revision 24c54e0efb0d604eb70dd1ac1c7f1bd4580cd192) @@ -15,13 +15,13 @@ HEPARIN_BUTTON_STATES = {0: "OFF", 1: "HEPARIN DELIVERY", 2: "RESUME DELIVERY", - 3: "HEPARIN DELIVERY", 4: "PAUSE DELIVERY", + 3: "HEPARIN DELIVERY", 4: "PAUSE HEPARIN", 5: "OFF", 6: "HEPARIN DELIVERY"} HEPARIN_STATE_MSGS = {"STATE_0_OFF_MESSAGE": "", "STATE_1_HEPARIN DELIVERY_MESSAGE": "Delivery Stopped", "STATE_2_RESUME DELIVERY_MESSAGE": "Delivery Paused", "STATE_3_HEPARIN DELIVERY_MESSAGE": "Bolus Active", - "STATE_4_PAUSE DELIVERY_MESSAGE": "Dispensing Active", + "STATE_4_PAUSE HEPARIN_MESSAGE": "Dispensing Active", "STATE_5_OFF_MESSAGE": "Maximum Cumulative Heparin Volume Delivered", "STATE_6_HEPARIN DELIVERY_MESSAGE": "Syringe Empty"} @@ -39,12 +39,15 @@ treatment_end_state=TreatmentStates.TREATMENT_START_STATE.value, treatment_stop_state=TreatmentStates.TREATMENT_START_STATE.value, dialysis_state=TreatmentStates.TREATMENT_START_STATE.value) mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) test.compare(str(waitForObjectExists(names.o_treatment_text).text), config.TREATMENT_TEXT, utility.msg("Treatment title Text should be {}".format(config.TREATMENT_TEXT))) - mouseClick(waitForObject(names.o_trending_text)) - mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) - test.compare(str(waitForObjectExists(names.o_trending_text).text), config.TRENDING_TEXT, utility.msg("Trending title Text should be {}".format(config.TRENDING_TEXT))) - mouseClick(waitForObject(names.o_main_settings_text)) - mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) - test.compare(str(waitForObjectExists(names.o_main_settings_text).text), config.SETTINGS_TEXT, utility.msg("Trending title Text should be {}".format(config.SETTINGS_TEXT))) + + # TODO uncomment the following lines if Trending and Settings are visible in the TreatmentStack.qml' MainMenu + # mouseClick(waitForObject(names.o_trending_text)) + # mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) + # test.compare(str(waitForObjectExists(names.o_trending_text).text), config.TRENDING_TEXT, utility.msg("Trending title Text should be {}".format(config.TRENDING_TEXT))) + # mouseClick(waitForObject(names.o_main_settings_text)) + # mouseClick(waitForObject(names.o_treatmentHome_mouseArea_MouseArea_2)) + # test.compare(str(waitForObjectExists(names.o_main_settings_text).text), config.SETTINGS_TEXT, utility.msg("Trending title Text should be {}".format(config.SETTINGS_TEXT))) + test.compare(str(waitForObjectExists(names.o_state1_heparin_delivery_text).text), config.HEPARIN_DELIVERY_TEXT, utility.msg("Heparin Delivery Text should be {}".format(config.HEPARIN_DELIVERY_TEXT))) test.compare((waitForObjectExists(names.o_state1_heparin_delivery_text)).enabled, False, utility.msg("Heparin Delivery should be disabled")) initial_bolus_text = waitForObjectExists(names.o_state3_heparin_state_initial_bolus_text).text @@ -53,7 +56,7 @@ for index in range(10): utils.waitForGUI(0.2) - hd_simulator.cmd_set_treatment_heparin_data(cumulative = config.HEPARIN_VALUES["Cumulative Value"][index]) + hd_simulator.cmd_set_treatment_heparin_data(cumulative = config.HEPARIN_VALUES["Cumulative Value"][index], required = config.HEPARIN_VALUES["Required Value"][index]) parameter_text = object.children(waitForObjectExists(names.o_volume_delivered_text)) test.compare((str(parameter_text[2].text)), str(config.HEPARIN_VALUES["Cumulative Value"][index]) , "parameter value should be "+str(config.HEPARIN_VALUES["Cumulative Value"][index])) test.endSection() @@ -149,7 +152,8 @@ Method to verify rejection messages """ test.startSection("Verifying Rejection Messages") - rejection_msg = waitForObjectExists(utility.rejection_msg(text=config.REJECTION_REASON[reason_id])) + names.o_heparin_rejection_textLabel["text"] = config.REJECTION_REASON[reason_id] + rejection_msg = waitForObjectExists(names.o_heparin_rejection_textLabel) test.compare(rejection_msg.text, config.REJECTION_REASON[reason_id], utility.msg("The rejection message should be {}".format(config.REJECTION_REASON[reason_id]))) test.endSection()