Index: shared/scripts/configuration/config.py =================================================================== diff -u -r22fa52de3108551fe5f5c9a4d7246eeb9d103fa7 -r8fa2ad80ba80d1c413af323af4c48500383c52b5 --- shared/scripts/configuration/config.py (.../config.py) (revision 22fa52de3108551fe5f5c9a4d7246eeb9d103fa7) +++ shared/scripts/configuration/config.py (.../config.py) (revision 8fa2ad80ba80d1c413af323af4c48500383c52b5) @@ -32,7 +32,7 @@ BLOOD_PRIMING_TEXT = "Blood Priming" SALINE_UNIT = "mL" -BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" +#BLOOD_PRIMING_DEFAULT_VALUE = "0 mL" #instructions_imagelocation INSTRUCTION_CONF_LOCATION = "/home/denali/Projects/application/resources/settings/Instructions/Instructions.conf" @@ -110,4 +110,9 @@ "arterial_pressure_limit_high" : [20, 10, 11.931], "blood_pressure_measurement_interval" : [0, 5, 62], "rinseback_flow_rate" : [50, 25, 187], -} \ No newline at end of file +} + +BLOOD_PRIMING_UNIT = "mL" +BLOOD_PRIMING_VALUE_0 = "0" +BLOOD_PRIMING_DEFAULT_VALUE = BLOOD_PRIMING_VALUE_0 + " " + BLOOD_PRIMING_UNIT + Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r5452e639265be9bc37215535a02877c98ebaecee -r8fa2ad80ba80d1c413af323af4c48500383c52b5 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 5452e639265be9bc37215535a02877c98ebaecee) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 8fa2ad80ba80d1c413af323af4c48500383c52b5) @@ -9,15 +9,14 @@ # @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"] @@ -113,8 +112,7 @@ COMPLETE_COLOR= '#4290ec' ENABLED_COLOR = '#fcfcfc' INCOMPLETE_COLOR = '#607a91' -PATIENT_ID_TEXT = "Patient ID" -PATIENT_ID = "demopatientid" +PATIENT_ID_TEXT = "Patient ID" BLOOD_FLOW_RATE = "Blood Flow Rate" DIALYSATE_FLOW_RATE = "Dialysate Flow Rate" DURATION = "Duration" @@ -131,9 +129,7 @@ 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"] +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" @@ -151,6 +147,6 @@ "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"} +OPERATIONAL_PARAMETERS = {"Heparin Type": HEPARIN_TYPE, "Acid Concentrate": "Fres. Naturalyte","Bicarbonate Concentrate": BICARBONATE_CONCENTRATE, "Dialyzer Type": "BB Diacap Pro 16H"} + \ No newline at end of file Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r22fa52de3108551fe5f5c9a4d7246eeb9d103fa7 -r8fa2ad80ba80d1c413af323af4c48500383c52b5 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 22fa52de3108551fe5f5c9a4d7246eeb9d103fa7) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 8fa2ad80ba80d1c413af323af4c48500383c52b5) @@ -8,29 +8,26 @@ # @file utils.py # # @author (last) Joseph varghese -# @date (last) 15-Jan-2022 +# @date (last) 16-Jun-2022 # ############################################################################ import object import names import sys -import csv -import os import squish import time import test -from builtins import str as pyStr from dialin.ui.hd_simulator import HDSimulator from builtins import int as pyInt from configuration import config from dialin.ui import utils from datetime import datetime from dialin.common.msg_ids import MsgIds -from dialin.ui import utils + hd_simulator = HDSimulator() LOG_LOCATION = "/home/denali/Desktop/sd-card/log/*.log" @@ -121,8 +118,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 navigate_to_pretreatment_screen(mode): """ @@ -228,11 +224,9 @@ continue # arterial blood pressure low limit should be lower than the high limit by at least 30mmHg if arterial_max == arterial_min + config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(high_handler_parent.maxValue, arterial_max, - "Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) + test.compare(high_handler_parent.maxValue, arterial_max,"Arterial range maximum value cannot be moved beyond {}".format(arterial_max)) else: - test.compare(arterial_max, art_high, - "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) + test.compare(arterial_max, art_high, "Actual Arterial range maximum value: {} is equal to Expected value: {}".format(arterial_max, art_high)) test.endSection() @@ -310,30 +304,27 @@ squish.Qt.NoModifier, squish.Qt.LeftButton) ven_min += 10 if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: # venous blood pressure low limit should be lower than the high limit by at least 30mmHg - squish.mouseDrag(low_handler, width, height, 1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, 1, 0,squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) break else: continue elif ven_min > ven_low: while ven_min != ven_low: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, -1, 0,squish.Qt.NoModifier, squish.Qt.LeftButton) ven_min -= 10 # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - squish.mouseDrag(low_handler, width, height, -1, 0, - squish.Qt.NoModifier, squish.Qt.LeftButton) + squish.mouseDrag(low_handler, width, height, -1, 0,squish.Qt.NoModifier, squish.Qt.LeftButton) test.log("Venous range minimum value cannot be moved beyond {}".format(ven_min)) break else: continue # venous blood pressure low limit should be lower than the high limit by at least 30mmHg if ven_min == ven_max - config.BUFFER_LOW_AND_HIGH_LIMITS: - test.compare(low_handler_parent.minValue, ven_min, - "Venous range minimum value cannot be moved beyond {}".format(ven_min)) + test.compare(low_handler_parent.minValue, ven_min,"Venous range minimum value cannot be moved beyond {}".format(ven_min)) else: - test.compare(ven_min, ven_low, - "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) - test.endSection() \ No newline at end of file + test.compare(ven_min, ven_low, "Actual Venous range minimum value: {} is equal to Expected value: {}".format(ven_min, ven_low)) + test.endSection() + + \ No newline at end of file Index: tst_instructions_poc/test.py =================================================================== diff -u -rca99bab623b569776c442743af75451b7e294da8 -r8fa2ad80ba80d1c413af323af4c48500383c52b5 --- tst_instructions_poc/test.py (.../test.py) (revision ca99bab623b569776c442743af75451b7e294da8) +++ tst_instructions_poc/test.py (.../test.py) (revision 8fa2ad80ba80d1c413af323af4c48500383c52b5) @@ -107,7 +107,7 @@ @param - (int) index: index of data from Instructions.conf file @return - (int) index """ - test.startSection("Verifying instruction and image from " +title+ " screen") + test.startSection("Verifying instruction and image from" +title+ "screen") for count in range(title_count_dict.get(title)): instruction_text = instructions[index] image_text = image_names[index] @@ -118,7 +118,7 @@ instruction_text = instruction_text.rstrip() image_status = waitForObjectExists(get_img_obj(text_obj_names[0],"{}{}".format(config.IMAGE_LOCATION,image_text))).status test.compare(str(image_status),str(IMAGE_READY),image_text + " - image title is valid and loaded on UI.") - test.compare(str(waitForObject(get_text_obj(text_obj_names[0],instruction_text)).text),instruction_text, "Instruction from " +title+ " screen is visible and matched") + test.compare(str(waitForObject(get_text_obj(text_obj_names[0],instruction_text)).text),instruction_text, "Instruction from" +title+ "screen is visible and matched") if object.exists(names.o_next_button_ws): mouseClick(waitForObject(names.o_next_button)) if object.exists(names.o_fail_button_ws): @@ -133,17 +133,17 @@ Method to set create custom treatment slider value based on slider buffer """ test.startSection("Method to set create custom treatment slider based on positive slider buffer") - test.compare(waitForObject(names.o_PreTreatmentCreate_Create_a_Custom_Treatment_Text).text, config.TREATMENT_TITLE, "Title text should be -> "+str(config.TREATMENT_TITLE)) - test.compare(waitForObject(names.o_PreTreatmentCreate_PRESCRIPTION_Text).text, config.PRESCRIPTION_TITLE, "Title text should be -> "+str(config.PRESCRIPTION_TITLE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_Create_a_Custom_Treatment_Text).text, config.TREATMENT_TITLE, "Title text should be ->"+str(config.TREATMENT_TITLE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_PRESCRIPTION_Text).text, config.PRESCRIPTION_TITLE, "Title text should be ->"+str(config.PRESCRIPTION_TITLE)) #set custom values for parameters test.startSection("verification of blood flow values") - test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment).label, config.BLOOD_FLOW_RATE, "Parameter should be -> "+str(config.BLOOD_FLOW_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment).label, config.BLOOD_FLOW_RATE, "Parameter should be ->"+str(config.BLOOD_FLOW_RATE)) test_custom_treatment_slider(names.o_PreTreatmentCreate_bloodFlowRateSlider_Slider, 100, config.CREATE_TREATMENT_SLIDER_VALUES["blood_flow_rate"], config.BLOOD_FLOW_RATE) test.endSection() test.startSection("verification of dialysate flow values") - test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment).label, config.DIALYSATE_FLOW_RATE, "Parameter should be -> "+str(config.DIALYSATE_FLOW_RATE)) + test.compare(waitForObject(names.o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment).label, config.DIALYSATE_FLOW_RATE, "Parameter should be ->"+str(config.DIALYSATE_FLOW_RATE)) test_custom_treatment_slider(names.o_PreTreatmentCreate_dialysateFlowRateSlider_Slider, 250, config.CREATE_TREATMENT_SLIDER_VALUES["dialysate_flow_rate"], config.DIALYSATE_FLOW_RATE) test.endSection() @@ -303,7 +303,7 @@ slider_width = ((value - minimum_slider_value)/slider_buffer) * width_buffer utils.waitForGUI(0.3) mouseClick(findObject(slider_object), float(slider_width) , 3, Qt.LeftButton) - test.compare(waitForObjectExists(slider_object).value, value, str(parameter)+" slider value should set to"+str(value)) + test.compare(waitForObjectExists(slider_object).value, value, str(parameter)+"slider value should set to"+str(value)) def main(): utils.tstStart(__file__) @@ -329,7 +329,7 @@ rightarrow_obj_names.pop(first_index) test.endSection() - test.startSection("Method to navigate to create custom treatment to set all parameters ") + test.startSection("Method to navigate to create custom treatment to set all parameters") hd_simulator.cmd_send_hd_operation_mode(op_mode = HDOpModes.MODE_TPAR.value , sub_mode = HDOpSubModes.SUBMODE_START.value) mouseClick(waitForObject(names.o_input_patient_id)) type(waitForObject(names.o_input_patient_id), "abcd")