Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r4554e32860b9a12d2bc94bd15f1dab4e8a436a9a -ra6d893b28af0dfab579a0c4ee00055af0a6d152d --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 4554e32860b9a12d2bc94bd15f1dab4e8a436a9a) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision a6d893b28af0dfab579a0c4ee00055af0a6d152d) @@ -251,6 +251,8 @@ MIN_DIASTOLIC = "40" MIN_HEARTRATE = "40" +DISCONNECT_PATIENT_TITLE ="Disconnect Patient BloodLines" +DISCONNECT_PATIENT_TEXT ="Clamp and disconnect patient bloodlines." Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r4554e32860b9a12d2bc94bd15f1dab4e8a436a9a -ra6d893b28af0dfab579a0c4ee00055af0a6d152d --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 4554e32860b9a12d2bc94bd15f1dab4e8a436a9a) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision a6d893b28af0dfab579a0c4ee00055af0a6d152d) @@ -350,4 +350,9 @@ #prescription_header_bar o_leftColumn_Column = {"container": o_Overlay, "id": "_leftColumn", "type": "Column", "unnamed": 1} +o_PostTreatmentStack_postTreatmentDisconnectStack_PostTreatmentDisconnectStack = {"container": o_PostTreatmentStack_PostTreatmentStack, "id": "_postTreatmentDisconnectStack", "type": "PostTreatmentDisconnectStack", "unnamed": 1, "visible": True} +o_postTreatmentDisconnectStack_PostTreatmentBase_PostTreatmentBase = {"container": o_PostTreatmentStack_postTreatmentDisconnectStack_PostTreatmentDisconnectStack, "objectName": "_PostTreatmentBase", "type": "PostTreatmentBase", "visible": True} +o_PostTreatmentBase_instructionView_InstructionView = {"container": o_postTreatmentDisconnectStack_PostTreatmentBase_PostTreatmentBase, "id": "_instructionView", "type": "InstructionView", "unnamed": 1} +o_PostTreatmentStack_confirmButton_ConfirmButton = {"container": o_PostTreatmentStack_PostTreatmentStack, "objectName": "_confirmButton", "type": "ConfirmButton", "visible": True} + Index: suite_leahi/tst_post_treatement_foundation/test.py =================================================================== diff -u --- suite_leahi/tst_post_treatement_foundation/test.py (revision 0) +++ suite_leahi/tst_post_treatement_foundation/test.py (revision a6d893b28af0dfab579a0c4ee00055af0a6d152d) @@ -0,0 +1,74 @@ +# Subject/Title: LDT -3672 SW Misc & Enhc - SW - 02 - New Design - CreateRx - Q&R - 15: SIT - Software Integration Tests - Squish Qt +# +# Functionalities: Testing all functionalities of Treatment parameters validation mode(Create RX) +# +# Steps: +# 1 Create RX: +# - Verify the treatment modality set to HD +# - Verify the treatment modality set to HDF +# - When Treatment mode set to HDF check the below buttons are visible +# - a.In HDF mode HDF operation Mode button is visible +# - b.In HDF mode Substitution Fluid Volume button is visible + + +import names + +from names import * +import squish +from leahi_dialin.ui import utils +from configuration import config,utility,navigation +from leahi_dialin.ui.td_messaging import TD_Messaging +from leahi_dialin.common.td_defs import TDOpModes +from builtins import int as pyInt +from squish import * +from leahi_dialin.protocols import CAN +from leahi_dialin.common.msg_defs import MsgIds, MsgFieldPositions + +td = TD_Messaging() +postTreatmentState = "-1" + +def handle_post_treatment_request( message, timestamp = 0.0): + """ + Called when the user requests to firmware from UI + @return: None + """ + message = message['message'] + index = MsgFieldPositions.START_POS_FIELD_1 + state,index = conversions.bytearray_to_integer( message, index) + global postTreatmentState + postTreatmentState = str(state) + +def main(): + utils.tstStart(__file__) + + can_interface = td.can_interface + global endTreatmentState + + # handle sent messages from UI + if can_interface is not None: + channel_id = CAN.DenaliChannels.ui_to_td_ch_id + message_id = MsgIds.MSG_ID_UI_ADJUST_PATIENT_DISCONNECT_CONFIRM_REQUEST.value + can_interface.register_receiving_publication_function(channel_id, + message_id, + handle_post_treatment_request) + + + + + test.startSection("Post-Treatment Foundation") + startApplication(utility.aut("-q")) + + td.td_operation_mode(TDOpModes.MODE_STAN.value) + td.td_operation_mode(TDOpModes.MODE_POST.value) + test.compare(waitForObjectExists(names.o_PostTreatmentBase_instructionView_InstructionView, 3000).title, + config.DISCONNECT_PATIENT_TITLE,"Comparison of Disconnect Page Title Text",) + disconnect_obj = waitForObjectExists(names.o_PostTreatmentBase_instructionView_InstructionView, 3000) + disconnect_text = utility.findChildByText(disconnect_obj, config.DISCONNECT_PATIENT_TEXT) + test.compare(str(disconnect_text.text),config.DISCONNECT_PATIENT_TEXT,"Comparison of Disconnect Page Text") + mouseClick(waitForObject(names.o_PostTreatmentStack_confirmButton_ConfirmButton)) + test.verify(waitFor("'postTreatmentState == 6'", 5000), "Testing UI -> TD message end state") + td.td_patient_disconnect_confirm_response(vAccepted= 1, + vRejectionReason= 0) + test.log("values") + + \ No newline at end of file