Index: shared/scripts/configuration/config.py =================================================================== diff -u -rfc2bd008f7fbaa68dc4b29f9219c506a2830cce1 -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- shared/scripts/configuration/config.py (.../config.py) (revision fc2bd008f7fbaa68dc4b29f9219c506a2830cce1) +++ shared/scripts/configuration/config.py (.../config.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -14,25 +14,12 @@ ############################################################################ import os - +from configuration.strings import * AUT_NAME = "denaliSquish" COMMON_PATH = os.environ['HOME']+"/Projects" -COLOR_CODES = {"Aqua": "#81ffff", "Blue": "#017dea", "Blue 2": "#1090d5", "Green": "#29fd2d", "Grey": "#d3d3d3", - "Lavender": "#db98f5", "Light Blue": "#acd7f1", "Light Teal": "#29f1da","Lime": "#b7fc36", - "Magenta":"#fd28fd", "Orange": "#f2721c", "Peach":"#f1979a", "Red": "#c53b33", "Rose":"#fc178d", - "Slate blue":"#7f7ffa", "Violet": "#6435c9", "White": "#ffffff", "Yellow": "#fcfc4d"} - -#standby mode -GOODMORNING_START_TIME_SEC = 0 -GOODEVENING_START_TIME_SEC = 43200 - -BLOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" - #end-treatment screens CURRENT_COLOR = '#000000' COMPLETE_COLOR= '#000000' @@ -44,6 +31,7 @@ END_TREATMENT_COMPLETE_STATE_TEXT = "Treatment Complete" END_TREATMENT_COMPLETE_PAUSED_STATE_TEXT = "Treatment Complete Paused" +NUM_OF_REQUEST_REJECT_REASONS = 43 Index: shared/scripts/configuration/strings.py =================================================================== diff -u -ra64b2a628c5e51f9e9cb211f14dc9b54ecbd747f -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- shared/scripts/configuration/strings.py (.../strings.py) (revision a64b2a628c5e51f9e9cb211f14dc9b54ecbd747f) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -1,23 +1,49 @@ - -########################################################################### -# -# Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. -# -# 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 strings.py -# -# @author (last) LTTS -# @date (last) 18-Jan-2022 -# -############################################################################ -BLOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" - -#ui_logs -ACK_REQ_STATUS = 'Ack Req' -ACK_BAK_STATUS = 'Ack Bak' - - \ No newline at end of file +# -*- coding: utf-8 -*- +# dictionary of rejection reason from application source code. +# message location -> denali-> Headers-> common-> MsgDefs.h +REJECTION_REASON = { + 0: "No Active Alarm List", + 1: "REQUEST_REJECT_REASON_NOT_ALLOWED_IN_CURRENT_MODE", # Request is not allowed in the current operating mode + 2: "REQUEST_REJECT_REASON_TIMEOUT_WAITING_FOR_USER_CONFIRM", # Validated request was not confirmed by user in reasonable time + 3: "REQUEST_REJECT_REASON_NOT_IN_TREATMENT_MODE", # Request is not allowed if not in treatment mode + 4: "REQUEST_REJECT_REASON_INVALID_TREATMENT_STATE", # Request is not allowed in current treatment state + 5: "REQUEST_REJECT_REASON_TREATMENT_TOO_CLOSE_TO_FINISHED", # Request is not allowed so near end of treatment + 6: "REQUEST_REJECT_REASON_TREATMENT_TIME_OUT_OF_RANGE", # Treatment duration is out of range + 7: "REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_CURRENT", # Treatment time change is less than currently elapsed treatment time + 8: "REQUEST_REJECT_REASON_BLOOD_FLOW_OUT_OF_RANGE", # Blood flow is out of range + 9: "REQUEST_REJECT_REASON_DIAL_FLOW_OUT_OF_RANGE", # Dialysate flow is out of range + 10: "REQUEST_REJECT_REASON_DIAL_VOLUME_OUT_OF_RANGE", # Dialysate flow rate or treatment duration causes dialysate volume to exceed limit + 11: "REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE", # Ultrafiltration volume is out of range + 12: "REQUEST_REJECT_REASON_UF_RATE_OUT_OF_RANGE", # Ultrafiltration rate is out of range + 13: "REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_MINIMUM", # Treatment time change is less than minimum treatment time + 14: "REQUEST_REJECT_REASON_UF_NOT_IN_PROGESS", # Ultrafiltration is not currently in progress + 15: "REQUEST_REJECT_REASON_UF_NOT_PAUSED", # Ultrafiltration is not currently paused + 16: "REQUEST_REJECT_REASON_SALINE_BOLUS_IN_PROGRESS", # A saline bolus is in progress + 17: "REQUEST_REJECT_REASON_PARAM_OUT_OF_RANGE", # A treatment parameter is out of range + 18: "REQUEST_REJECT_REASON_HEPARIN_PRESTOP_EXCEEDS_DURATION", # The Heparin pre-stop setting is greater than the treatment duration + 19: "REQUEST_REJECT_REASON_ARTERIAL_PRESSURE_LOW_VS_HIGH", # Arterial pressure low and high alarm limits are not inconsistent + 20: "REQUEST_REJECT_REASON_VENOUS_PRESSURE_LOW_VS_HIGH", # Venous pressure low and high alarm limits are inconsistent + 21: "REQUEST_REJECT_REASON_SALINE_MAX_VOLUME_REACHED", # Saline bolus volume maximum has been reached - no more saline allowed + 22: "REQUEST_REJECT_REASON_SALINE_BOLUS_NOT_IN_PROGRESS", # A saline bolus is not in progress + 23: "REQUEST_REJECT_REASON_ACTION_DISABLED_IN_CURRENT_STATE", # Requested user action is disabled in current state + 24: "REQUEST_REJECT_REASON_ALARM_IS_ACTIVE", # Requested user action not allowed while alarm is active + 25: "REQUEST_REJECT_REASON_INVALID_COMMAND", # Requested user action invalid + 26: "REQUEST_REJECT_REASON_TREATMENT_IS_COMPLETED", # The treatment has been completed + 27: "REQUEST_REJECT_REASON_ADDL_RINSEBACK_MAX_VOLUME_REACHED", # Rinseback additional volume maximum has been reached - no more additional rinsebacks allowed + 28: "REQUEST_REJECT_REASON_UF_VOLUME_NOT_SET", # Ultrafiltration volume is not set yet + 29: "REQUEST_REJECT_REASON_NO_PATIENT_CONNECTION_CONFIRM", # The user has not confirmed patient connection + 30: "REQUEST_REJECT_REASON_HEPARIN_PAUSE_INVALID_IN_THIS_STATE", # Heparin cannot be paused if not currently deliverying Heparin + 31: "REQUEST_REJECT_REASON_HEPARIN_NOT_PAUSED", # Heparin cannot be resumed if not paused + 32: "REQUEST_REJECT_REASON_DG_COMM_LOST", # Treatment cannot initiate if DG comm is lost + 33: "REQUEST_REJECT_REASON_DRAIN_NOT_COMPLETE", # Post-treatment reservoirs drain not complete + 34: "REQUEST_REJECT_REASON_DG_NOT_IN_STANDBY_IDLE_STATE", # Treatment cannot initiate if DG is not in standby idle state + 35: "REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT", # Request message not formatted properly + 36: "REQUEST_REJECT_REASON_INVALID_DATE_OR_TIME", # Given date/time is invalid + 37: "REQUEST_REJECT_REASON____AVAILABLE_1", # Not used - available for use + 38: "REQUEST_REJECT_REASON_BATTERY_IS_NOT_CHARGED", # Battery does not have enough charge to start treatment + 39: "REQUEST_REJECT_REASON_RINSEBACK_NOT_COMPLETED", # Cannot move on to recirculate without completing full rinseback. + 40: "REQUEST_REJECT_REASON_RESERVOIR_ONE_IS_NOT_READY", # Reservoir one fill is not complete + 41: "REQUEST_REJECT_REASON_PUMP_TRACK_NOT_CLOSED", # Pump track is not ready / closed + 42: "REQUEST_REJECT_REASON_DOOR_NOT_CLOSED", # Door is not closed + 43: "REQUEST_REJECT_REASON_SYRINGE_NOT_PRESENT", # Syringe is not present + } \ No newline at end of file Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r05fb0b11e3823a97789661f4d7e598808b137b1a -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 05fb0b11e3823a97789661f4d7e598808b137b1a) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -132,4 +132,8 @@ except LookupError as _: test.passes("object is not present as expected") - squish.testSettings.objectNotFoundDebugging = True \ No newline at end of file + squish.testSettings.objectNotFoundDebugging = True + +def end_treatment_states_rejection_msg(text): + names.o_end_treatment_state_rejection_msg["text"] = text + return names.o_end_treatment_state_rejection_msg \ No newline at end of file Index: shared/scripts/names.py =================================================================== diff -u -rfc2bd008f7fbaa68dc4b29f9219c506a2830cce1 -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- shared/scripts/names.py (.../names.py) (revision fc2bd008f7fbaa68dc4b29f9219c506a2830cce1) +++ shared/scripts/names.py (.../names.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -56,6 +56,6 @@ o_end_treatment_complete_state = {"container": o_EndTreatmentEndStack_EndTreatmentBase_EndTreatmentBase, "text": "Treatment Complete", "type": "Text", "unnamed": 1, "visible": True} o_end_treatment_complete_paused_state = {"container": o_EndTreatmentEndStack_EndTreatmentBase_EndTreatmentBase, "text": "Treatment Complete Paused", "type": "Text", "unnamed": 1, "visible": True} o_start_rinseback_button_text = {"container": o_EndTreatmentEndStack_EndTreatmentBase_EndTreatmentBase, "text": "START RINSEBACK", "type": "Text", "unnamed": 1, "visible": True} +o_end_treatment_state_rejection_msg = {"container": o_EndTreatmentEndStack_EndTreatmentEndStack, "type": "Text", "unnamed": 1, "visible": True} - Index: tst_end_treatment/test.py =================================================================== diff -u -rfc2bd008f7fbaa68dc4b29f9219c506a2830cce1 -rbcc1a6e17ebd009e7c08228b24deca470a0dba18 --- tst_end_treatment/test.py (.../test.py) (revision fc2bd008f7fbaa68dc4b29f9219c506a2830cce1) +++ tst_end_treatment/test.py (.../test.py) (revision bcc1a6e17ebd009e7c08228b24deca470a0dba18) @@ -39,6 +39,7 @@ test.compare(str(waitForObjectExists(names.o_start_rinseback_button_text).text), config.RINSEBACK_BUTTON_TEXT, "Rinseback button text must be {}".format(config.RINSEBACK_BUTTON_TEXT)) test.verify(waitForObjectExists(names.o_start_rinseback_button_text).enabled, " Start Rinseback button must be active") mouseClick(waitForObject(names.o_start_rinseback_button_text)) + verify_end_treatment_states_rejection_msg() test.endSection() test.startSection("verifying End treatment Treatment Paused state screens") @@ -49,9 +50,19 @@ test.compare(str(waitForObject(names.o_end_treatment_complete_paused_state).text),config.END_TREATMENT_COMPLETE_PAUSED_STATE_TEXT, "Treatment text must be {}".format(config.END_TREATMENT_COMPLETE_PAUSED_STATE_TEXT)) test.endSection() test.endSection() - - +def verify_end_treatment_states_rejection_msg(): + """ + Method to verify rinseback setup rejection messages + """ + test.startSection("verifying rejection messages in rinseback screens ") + for reason_id in range(1, config.NUM_OF_REQUEST_REJECT_REASONS + 1): + hd_simulator.cmd_send_treatment_adjust_end_response(accepted = 0, reason= reason_id) + rejection_message = waitForObjectExists(utility.end_treatment_states_rejection_msg(text=config.REJECTION_REASON[reason_id])) + test.compare(rejection_message.text, config.REJECTION_REASON[reason_id], "expected rejection {msg} displayed".format(msg=config.REJECTION_REASON[reason_id])) + test.endSection() + + def main(): utils.tstStart(__file__)