Index: shared/scripts/configuration/config.py =================================================================== diff -u -r8599e463aedf05d6a36824ca4eba62d914a5db5c -r603975795daa75d928e6da235be9074f3bba9c1d --- shared/scripts/configuration/config.py (.../config.py) (revision 8599e463aedf05d6a36824ca4eba62d914a5db5c) +++ shared/scripts/configuration/config.py (.../config.py) (revision 603975795daa75d928e6da235be9074f3bba9c1d) @@ -25,3 +25,4 @@ + Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r8599e463aedf05d6a36824ca4eba62d914a5db5c -r603975795daa75d928e6da235be9074f3bba9c1d --- shared/scripts/configuration/strings.py (.../strings.py) (revision 8599e463aedf05d6a36824ca4eba62d914a5db5c) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 603975795daa75d928e6da235be9074f3bba9c1d) @@ -9,238 +9,24 @@ # @file strings.py # # @author (last) LTTS -# @date (last) 18-Jan-2022 +# @date (last) 16-Jun-2022 # ############################################################################ -#standby mode -BLOOD_PRIMING_TEXT = "Blood Priming" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] -# dictionary of rejection reason from application source code. -# message location -> denali-> Headers-> common-> MsgDefs.h -# pretreatment_patient_connection -DIASTOLIC_TEXT = "diastolic" -SYSTOLIC_TEXT = "systolic" -OUT_OF_RANGE_COLOR = "#c53b33" -IN_RANGE_COLOR = "#fcfcfc" -HEART_RATE_TITLE = "Heart Rate" -BLOOD_PRESSURE_TITLE = "Blood Pressure" -BLOOD_PRESSURE_UNIT = "mmHg" -HEART_RATE_UNIT = "BPM" -PATIENT_CONNECTION_TEXT = "Patient Connection" -UF_VOLUME_TEXT = "Ultrafiltration Volume (L)" -UF_TITLE_TEXT = "Ultrafiltration Setup" -BP_HR_TEXT = "BP/HR" -SKIP_TEXT = "SKIP" -TUTORIAL_TEXT = { - 0 : "Wash your hands and establish vascular access per your clinic's instructions.", - 1 : "Pinch arterial clamp and venous clamp on located on the cartridge patient lines.", - 2 : "Remove arterial and venous shunt.", - 3 : "Connect arterial and venous cartridge lines to your patient access lines." -} -PRE_TREATMENT_SCREENS = ["Create" , "Sample" , "Consumables" , "Disposables" , "Prime" , "Ultrafiltration" , "BP/HR" , "Connection" , "Start"] -# 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 - } - -#create custom treatment -PATIENT_ID = "demopatientid" -TREATMENT_TITLE = "Create a Custom Treatment" -HEPARIN_TYPE = "UFH 1,000 IU/mL" -ACID_CONCENTRATE = ["Fres. Naturalyte", "08-1251-1", "08-2251-0", "08-3251-9"] -BICARBONATE_CONCENTRATE = "Fres. Centrisol" -DIALYZER_TYPE = ["BB Diacap Pro 13H", "BB Diacap Pro 16H", "BB Diacap Pro 19H", "F Optiflux F160NRe", "F Optiflux F180NRe"] -CONFIRM_TREATMENT_TITLE = "Confirm Treatment" -PRESCRIPTION_TITLE = "PRESCRIPTION" -OPERATING_PARAMETERS_TITLE = "OPERATING PARAMETERS" -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"} - CURRENT_COLOR = '#000000' COMPLETE_COLOR= '#4290ec' ENABLED_COLOR = '#fcfcfc' INCOMPLETE_COLOR = '#607a91' -PATIENT_ID_TEXT = "Patient ID" -PATIENT_ID = "demopatientid" -BLOOD_FLOW_RATE = "Blood Flow Rate" -DIALYSATE_FLOW_RATE = "Dialysate Flow Rate" -DURATION = "Duration" -HEPARIN_DISPENSING_RATE = "Heparin Dispensing Rate" -HEPARIN_BOLUS_VOLUME = "Heparin Bolus Volume" -HEPARIN_STOP_TIME = "Heparin Stop Time" -SALINE_BOLUS_VOLUME = "Saline Bolus Volume" -HEPARIN_TYPE_TITLE = "Heparin Type" -SALINE_BOLUS_TITLE = "Saline Bolus" -ACID_CONCENTRATE_TITLE = "Acid Concentrate" -BICARBONATE_CONCENTRATE_TITLE = "Bicarbonate Concentrate" -DIALYZER_TYPE_TITLE = "Dialyzer Type" -DIALYSATE_TEMPERATURE = "Dialysate Temperature" -BLOOD_PRESSURE_MEASUREMENT_INTERVAL = "Blood Pressure Measurement Interval" -RINSEBACK_FLOW_RATE = "Rinseback Flow Rate" -CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", "Duration","Heparin Dispensing Rate", - "Heparin Bolus Volume","Heparin Stop Time", "Saline Bolus", "Dialysate Temperature", - "Blood Pressure Measurement Interval", "Rinseback Flow Rate"] -TREATMENT_UNHIGHLIGHTED_COLOR = "#000000" -TREATMENT_HIGHLIGHTED_COLOR = "#135088" -OFF_TEXT = "OFF" -BACK_TEXT = "BACK" -CONTINUE_TEXT = "CONTINUE" - -PRESCRIPTION_DETAILS = { - "Blood Flow Rate": "mL/min", "Dialysate Flow Rate": "mL/min", - "Duration": "min", "Heparin Dispensing Rate": "mL/hr", - "Heparin Bolus Volume": "mL", "Heparin Stop Time": "min", - "Saline Bolus Volume": "mL", - "Dialysate Temperature": "°C", "Arterial Pressure Limit Low": "mmHg", - "Arterial Pressure Limit High": "mmHg","Blood Pressure Measure Interval":"min", - "Rinseback Rate" : "mL/min", "Venous Pressure Limit High": "mmHg", - "Venous Pressure Limit Low": "mmHg" -} - -OPERATIONAL_PARAMETERS = {"Heparin Type": HEPARIN_TYPE, "Acid Concentrate": "Fres. Naturalyte", - "Bicarbonate Concentrate": BICARBONATE_CONCENTRATE, "Dialyzer Type": "BB Diacap Pro 16H"} - - -#tst_treatment_monitoring -FLOWS_TEXT = "FLOWS" -BLOOD_UNIT = "mL/min" -DIALYSATE_TEXT = "Dialysate" -BLOOD_TEXT = "Blood" -VITALS_TEXT = "VITALS" -BLOOD_PRESSURE_TEXT = "mmHg" -HEARTRATE_UNIT = "BPM" -PRESSURE_TEXT = "PRESSURE (mmHg)" -ARTEREAL_TEXT = "Arterial" -VENOUS_TEXT = "Venous" -TIME_DURATION_TEXT = "Time Remaining" -ULTRAFILTERATION_TEXT = "ULTRAFILTRATION VOLUME (L)" -SALINE_BOLUS = "SALINE BOLUS" -VOLUME_DELIVERED = "Volume Delivered" -CUMULATIVE_DELIVERED = "Cumulative Delivered" -HEPARIN_TEXT = "HEPARIN" -VOLUME_DELIVERED = "Volume Delivered" - -#patient id -PATIENT_ID = { - "qwerty" : "qwerty", - "sampleid" : "sampleid", - "abcdefghijklmnop" : "abcdefghijklmnop", - "patientid" : "patientid", - "username" : "username", - "sA@MpLE#123" : "sAMpLE123", - "A@BH&321" : "ABH321", - "5432@qwerty" : "5432qwerty" -} - -KEYBOARD_SWITCH = ["ABC", "&123"] - - -#main-treatment heparin -HEPARIN_UNIT = "mL" -HEPARIN_DELIVERY_TEXT = "HEPARIN DELIVERY" -HEPARIN_DELIVERY_OFF_TEXT = "OFF" -HEPARIN_STOP_TEXT = "Delivery Stopped" -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_MAXIMUM_VOLUME_DELIVERED_TEXT = "Maximum Cumulative Heparin Volume Delivered" -HEPARIN_SYRINGE_EMPTY_TEXT = "Syringe Empty" - -#Time_Duration -CREATE_TREATMENT_PARAMETERS = ["Blood Flow Rate", "Dialysate Flow Rate", "Duration","Heparin Dispensing Rate", - "Heparin Bolus Volume","Heparin Stop Time", "Saline Bolus","Dialysate Temperature","Blood Pressure Measurement Interval", - "Rinseback Flow Rate"] -TREATMENT_PAUSED_TEXT = "Treatment Paused" - - -#pre-treatment +#pre-treatment consumables CONSUMABLE_SELF_TEST_TEXT = "Consumables Self Test" BICARB_PUMP_CHECK_TEXT = "BiCarb Pump Check" ACID_PUMP_CHECK_TEXT = "Acid Pump Check" SELF_TEST_COMPLETE_TEXT = "Self Test Complete!" BUSY = "Busy" CHECK = "Check" -BEGIN_PRIME_TITLE = "Begin Prime" -PRIMING_TITLE = "Priming" -SYSTEM_SELF_TEST_TITLE = "System Self Test" -FILTER_FLUSH_TITLE = "Filter Flush" -SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" -BLOOD_PRIMING_TEXT = "Blood Priming" -#Pre-Treatment Disposables -NEXT_BUTTON_TEXT = "NEXT" -BACK_BUTTON_TEXT = "BACK" -CONFIRM_BUTTON_TEXT = "CONFIRM" - -#Pre_treatment_water_sample -SAMPLE_TEXT = "Sample" -CREATE_TEXT = "Create" -NEXT_BUTTON_TEXT = "NEXT" -WATER_SAMPLE_BUTTON_TEXT = "WATER SAMPLE" -BACK_BUTTON_TEXT = "BACK" -PASS_TEXT = "PASS" -FAIL_TEXT = "FAIL" -OK_TEXT = "OK" - -#priming -TEST_DRY_STEPS = ["Used Cartridge Check", "Occlusion Sensors Check", "Pressure Sensors Check", "Syringe Pump Check"] -PRIMING_STEPS = ["Blood Circuit Priming", "Dialysate Circuit Priming", "Wet Self Tests"] -SELF_TEST_COMPLETION_MSG = "Self Test Complete!" -PRIMING_COMPLETE_MSG = "Priming Complete!" - - Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r4346cb9ced50b3a6444997cde14e850c8313e72f -r603975795daa75d928e6da235be9074f3bba9c1d --- shared/scripts/configuration/utility.py (.../utility.py) (revision 4346cb9ced50b3a6444997cde14e850c8313e72f) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 603975795daa75d928e6da235be9074f3bba9c1d) @@ -67,8 +67,7 @@ squish.mouseWheel(ScreenObj, screenWidth-1000, screenHeight-10, 0, -50, squish.Qt.NoModifier) - raise LookupError("zone object is not in view to the user after " + \ - "trying 100 times") + raise LookupError("zone object is not in view to the user after trying 100 times") def verify_page_step_indicator(screen_obj, treatment_step, treatment_screens): """ @@ -83,29 +82,29 @@ step_title = squish.waitForObjectExists(get_text_object(screen_obj, treatment_screens[page])) if page < treatment_step: - test.log("To verify the step indicator of the completed treatment screen " + treatment_screens[page]) + test.log("To verify the step indicator of the completed treatment screen" + treatment_screens[page]) test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) - test.compare(bullet_circle_color, config.COMPLETE_COLOR, " the bullet color must be " + str(config.COMPLETE_COLOR)) - test.compare(bullet_border_color, config.COMPLETE_COLOR," the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name, config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) + test.compare(bullet_circle_color, config.COMPLETE_COLOR, "the bullet color must be" + str(config.COMPLETE_COLOR)) + test.compare(bullet_border_color, config.COMPLETE_COLOR,"the bullet border color must be" + str(config.COMPLETE_COLOR)) + test.compare(step_title.color.name, config.ENABLED_COLOR, "the text color must be" + str(config.ENABLED_COLOR)) elif page == treatment_step: - test.log("To verify the step indicators of the current treatment screen " + treatment_screens[page]) + test.log("To verify the step indicators of the current treatment screen" + treatment_screens[page]) test.verify(squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.COMPLETE_COLOR, " the bullet border color must be " + str(config.COMPLETE_COLOR)) - test.compare(step_title.color.name,config.ENABLED_COLOR, " the text color must be " + str(config.ENABLED_COLOR)) - test.verify(step_title.font.bold, " the current text must be in bold") + test.compare(bullet_circle_color,config.CURRENT_COLOR,"the bullet color must be" + str(config.CURRENT_COLOR)) + test.compare(bullet_border_color,config.COMPLETE_COLOR, "the bullet border color must be" + str(config.COMPLETE_COLOR)) + test.compare(step_title.color.name,config.ENABLED_COLOR, "the text color must be" + str(config.ENABLED_COLOR)) + test.verify(step_title.font.bold, "the current text must be in bold") else: test.log("To verify the step indicators of the remaining treatment screen " + treatment_screens[page]) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).current,) test.verify(not squish.waitForObjectExists(get_bullet_object(screen_obj, page)).complete,) - test.compare(step_title.color.name,config.INCOMPLETE_COLOR, " the text color must be " + str(config.INCOMPLETE_COLOR)) - test.compare(bullet_circle_color,config.CURRENT_COLOR," the bullet color must be " + str(config.CURRENT_COLOR)) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR, " the bullet border color must be " + str(config.INCOMPLETE_COLOR)) + test.compare(step_title.color.name,config.INCOMPLETE_COLOR, "the text color must be" + str(config.INCOMPLETE_COLOR)) + test.compare(bullet_circle_color,config.CURRENT_COLOR,"the bullet color must be" + str(config.CURRENT_COLOR)) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR, "the bullet border color must be" + str(config.INCOMPLETE_COLOR)) test.endSection() def get_text_object(screen_obj, txt): Index: tst_pre_treatment_consumables/test.py =================================================================== diff -u -rb3bcf1a0d38ee7b8884a94e70fa6adec8482ad36 -r603975795daa75d928e6da235be9074f3bba9c1d --- tst_pre_treatment_consumables/test.py (.../test.py) (revision b3bcf1a0d38ee7b8884a94e70fa6adec8482ad36) +++ tst_pre_treatment_consumables/test.py (.../test.py) (revision 603975795daa75d928e6da235be9074f3bba9c1d) @@ -23,13 +23,11 @@ from dialin.ui import utils from configuration import config, utility, strings from dialin.ui.hd_simulator import HDSimulator -from dialin.ui.utils import waitForGUI from dialin.common.hd_defs import PreTreatmentSubModes, PreTreatmentConsumableSelfTestStates, HDOpModes, HDOpSubModes, PreTreatmentSampleWaterStates, PreTreatmentConsumableSelfTestStates, PreTreatmentNoCartSelfTestsStates, PreTreatmentCartridgeInstallStates, PreTreatmentDrySelfTestsStates, PreTreatmentPrimeStates, PreTreatmentRecircStates, PreTreatmentPatientConnectionStates, PreTreatmentModeStates hd_simulator = HDSimulator() PRE_TREATMENT_STEP = PreTreatmentModeStates.HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE.value -num_of_instructions = 0 SCREEN_OBJ= names.o_PreTreatmentStack_preTreatmentConsumablesStack_PreTreatmentConsumablesStack @@ -86,21 +84,21 @@ if instruction <= num: test.compare(bullet_circle_color, config.COMPLETE_COLOR) test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.log("The bullet " + str(instruction) + " must be a complete bullet") + test.log("The bullet" + str(instruction) + "must be a complete bullet") else: test.compare(bullet_circle_color, config.CURRENT_COLOR) test.compare(bullet_border_color,config.INCOMPLETE_COLOR) - test.log("The bullet " + str(instruction) + " must be a incomplete bullet") + test.log("The bullet" + str(instruction) + "must be a incomplete bullet") test.endSection() def verify_consumable_states_text(): """ Method is to verify the Consumables Self test states' text. """ - test.compare(waitForObjectExists(names.o_PreTreatmentBase_Consumables_Self_Test_Text).text ,config.CONSUMABLE_SELF_TEST_TEXT," text must be " + config.CONSUMABLE_SELF_TEST_TEXT) - test.compare(waitForObjectExists(names.o_PreTreatmentBase_BiCarb_Pump_Check_Text).text, config.BICARB_PUMP_CHECK_TEXT," text must be " + config.BICARB_PUMP_CHECK_TEXT) - test.compare(waitForObjectExists(names.o_PreTreatmentBase_Acid_Pump_Check_Text).text,config.ACID_PUMP_CHECK_TEXT, " text must be from" + config.ACID_PUMP_CHECK_TEXT) - test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT," must be " + config.SELF_TEST_COMPLETE_TEXT ) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Consumables_Self_Test_Text).text ,config.CONSUMABLE_SELF_TEST_TEXT,"text must be" + config.CONSUMABLE_SELF_TEST_TEXT) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_BiCarb_Pump_Check_Text).text, config.BICARB_PUMP_CHECK_TEXT,"text must be" + config.BICARB_PUMP_CHECK_TEXT) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Acid_Pump_Check_Text).text,config.ACID_PUMP_CHECK_TEXT, "text must be from" + config.ACID_PUMP_CHECK_TEXT) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT,"must be" + config.SELF_TEST_COMPLETE_TEXT ) def verify_consumables_states(): """ @@ -111,31 +109,31 @@ """ test.startSection("Check and busy indicator shouldn't be present initially") for states in range (PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE.value): - test.startSection(" consumable self test state = " + PreTreatmentConsumableSelfTestStates(states).name) + test.startSection("consumable self test state =" + PreTreatmentConsumableSelfTestStates(states).name) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_WAIT_FOR_DISINFECT.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_BICARB_PUMP_CHECK_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value,recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) bicarb_indicator=utility.get_indicators(SCREEN_OBJ,config.BICARB_PUMP_CHECK_TEXT) acid_indicator=utility.get_indicators(SCREEN_OBJ,config.ACID_PUMP_CHECK_TEXT) - test.verify(not bicarb_indicator[0].visible, " busy indicator for bicarb pump must not be present") - test.verify(not bicarb_indicator[1].visible, " check indicator for bicarb pump must not be present") - test.verify(not acid_indicator[0].visible , " busy indicator for acid pump must not be present") - test.verify(not acid_indicator[1].visible, " check indicator for acid pump must not be present") + test.verify(not bicarb_indicator[0].visible, "busy indicator for bicarb pump must not be present") + test.verify(not bicarb_indicator[1].visible, "check indicator for bicarb pump must not be present") + test.verify(not acid_indicator[0].visible , "busy indicator for acid pump must not be present") + test.verify(not acid_indicator[1].visible, "check indicator for acid pump must not be present") test.endSection() test.endSection() test.startSection("Verification of Check and busy indicators") - test.log(" consumable self test state = " + PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE.name) + test.log("consumable self test state =" + PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE.name) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_WAIT_FOR_DISINFECT.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value,recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) bicarb_indicator=utility.get_indicators(SCREEN_OBJ,config.BICARB_PUMP_CHECK_TEXT) acid_indicator=utility.get_indicators(SCREEN_OBJ,config.ACID_PUMP_CHECK_TEXT) test.verify(waitForObject(bicarb_indicator[0]).visible,"The Busy indicator for BiCarb Pump must be visible") - test.verify(not acid_indicator[0].visible," busy indicator for acid pump must not be present") - test.verify(not acid_indicator[1].visible," check indicator for acid pump must not be present") + test.verify(not acid_indicator[0].visible,"busy indicator for acid pump must not be present") + test.verify(not acid_indicator[1].visible,"check indicator for acid pump must not be present") - test.log(" consumable self test state = " + PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_COMPLETE_STATE.name) + test.log("consumable self test state =" + PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_COMPLETE_STATE.name) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_WAIT_FOR_DISINFECT.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.CONSUMABLE_SELF_TESTS_COMPLETE_STATE.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, prime_state=PreTreatmentPrimeStates.HD_PRIME_START_STATE.value,recirculate_state=PreTreatmentRecircStates.PRE_TREATMENT_RECIRC_STATE.value, patient_connection_state=PreTreatmentPatientConnectionStates.PATIENT_CONNECTION_STATE.value) @@ -145,7 +143,7 @@ test.verify(waitForObject(bicarb_indicator[1]).visible,"The check indicator for Bicarb Pump must be visible") test.log("BiCarb Pump Check is completed") test.verify(waitForObject(acid_indicator[0]).visible,"The Busy indicator for Acid Pump must be visible") - test.log(" consumable self test state = " + PreTreatmentConsumableSelfTestStates.NUM_OF_CONSUMABLE_SELF_TESTS_STATES.name) + test.log("consumable self test state = " + PreTreatmentConsumableSelfTestStates.NUM_OF_CONSUMABLE_SELF_TESTS_STATES.name) hd_simulator.cmd_send_pre_treatment_state_data(sub_mode=HDOpSubModes.SUBMODE_WAIT_FOR_DISINFECT.value, water_sample_state=PreTreatmentSampleWaterStates.SAMPLE_WATER_SETUP_STATE.value,consumables_self_test_state=PreTreatmentConsumableSelfTestStates.NUM_OF_CONSUMABLE_SELF_TESTS_STATES.value, no_cartridge_self_test_state=PreTreatmentNoCartSelfTestsStates.NO_CART_SELF_TESTS_START_STATE.value,installation_state=PreTreatmentCartridgeInstallStates.CARTRIDGE_INSTALL_STATE.value, dry_self_test_state=PreTreatmentDrySelfTestsStates.DRY_SELF_TESTS_START_STATE.value, @@ -158,7 +156,7 @@ test. verify(acid_indicator[1].visible) test.verify(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).visible) test.log("Self test complete for consumables is done") - test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT," text must be " + config.SELF_TEST_COMPLETE_TEXT ) + test.compare(waitForObjectExists(names.o_PreTreatmentBase_Self_Test_Complete_Text).text,config.SELF_TEST_COMPLETE_TEXT,"text must be" + config.SELF_TEST_COMPLETE_TEXT ) test.endSection() def main(): @@ -172,18 +170,18 @@ names.o_bullet_object.pop("occurrence") list_of_bullets = findAllObjects(names.o_bullet_object) num_of_instructions = len(list_of_bullets) - config.NUM_OF_PRETREATMENT_BULLETS - test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled, " confirm button must not be active") + test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled, "confirm button must not be active") verify_right_instruction_navigation() - test.verify(waitForObjectExists(names.o_confirm_button_enabled).enabled, " confirm button must be active") + test.verify(waitForObjectExists(names.o_confirm_button_enabled).enabled, "confirm button must be active") verify_left_instruction_navigation() - test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled ," confirm button must not be active") + test.verify(not waitForObjectExists(names.o_confirm_button_enabled).enabled ,"confirm button must not be active") for right_arrow in range(1, num_of_instructions): mouseClick(waitForObject(names.o_PreTreatmentBase_rightImage_Image)) mouseClick(waitForObject(names.o_confirm_button_enabled)) test.endSection() - test.startSection("verification of consumable self test ") - test.verify(not object.exists(names.o_PreTreatmentBase_Self_Test_Complete_Text),config.SELF_TEST_COMPLETE_TEXT + " must not be present ") + test.startSection("verification of consumable self test") + test.verify(not object.exists(names.o_PreTreatmentBase_Self_Test_Complete_Text),config.SELF_TEST_COMPLETE_TEXT + "must not be present") verify_consumables_states() verify_consumable_states_text() test.endSection()