Index: shared/scripts/configuration/config.py =================================================================== diff -u -r571936f8ececab602e4b5cecc030d2571d62f5a4 -r454470a94a58be24a6fcec1263ee4af64f51a2d5 --- shared/scripts/configuration/config.py (.../config.py) (revision 571936f8ececab602e4b5cecc030d2571d62f5a4) +++ shared/scripts/configuration/config.py (.../config.py) (revision 454470a94a58be24a6fcec1263ee4af64f51a2d5) @@ -29,14 +29,3 @@ RECONNECT_BUTTON_TEXT = "RECONNECT" RECONNECT_TEXT = "Reconnect" NUM_OF_REQUEST_REJECT_REASONS = 43 - - - - - - - - - - - Index: shared/scripts/configuration/strings.py =================================================================== diff -u -r6f75b9f63739e13030389f79d5dca33d8077dada -r454470a94a58be24a6fcec1263ee4af64f51a2d5 --- shared/scripts/configuration/strings.py (.../strings.py) (revision 6f75b9f63739e13030389f79d5dca33d8077dada) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 454470a94a58be24a6fcec1263ee4af64f51a2d5) @@ -12,41 +12,8 @@ # @date (last) 18-Jan-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 @@ -93,64 +60,3 @@ 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"} - \ No newline at end of file Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r571936f8ececab602e4b5cecc030d2571d62f5a4 -r454470a94a58be24a6fcec1263ee4af64f51a2d5 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 571936f8ececab602e4b5cecc030d2571d62f5a4) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 454470a94a58be24a6fcec1263ee4af64f51a2d5) @@ -26,25 +26,41 @@ from datetime import datetime from dialin.ui import utils -def convert_seconds_into_min_and_sec(seconds): - min = time.strftime("%M", time.gmtime(seconds)) - sec = time.strftime("%S", time.gmtime(seconds)) - return min,sec - -def get_indicators(screen_obj, txt): + +def verify_bullet_navigation(num, num_of_instructions, screen_obj): """ - Verifying the busy indicators for BiCarb Pump Check and Acid Pump Check. - indicator object of expected text - @param step - (str) expected text - @return indicators - (obj) list of busy and check indicator + Method to verify status of bullets based + on number of instruction screen + @param num - (int) number of indicator + @param num_of_instructions- (int) count the number of instructions + @param object - screen_obj - (str) Screen object """ - parent_obj = object.parent(squish.waitForObjectExists(get_text_object(screen_obj,txt))) - children_obj = object.children(parent_obj) - indicator_parent = children_obj[2] - indicators = object.children(indicator_parent) - return indicators - squish.testSettings.objectNotFoundDebugging = True - + test.startSection("instruction bullet verification for screens") + for instruction in range(1, num_of_instructions): + bullet_children = object.children(squish.waitForObjectExists(get_bullet_object(screen_obj,(0 + instruction) - 1))) + bullet_circle_color = bullet_children[0].color.name + bullet_border_color = bullet_children[0].border.color.name + if instruction <= num: + test.compare(bullet_circle_color, config.COMPLETE_COLOR) + test.compare(bullet_border_color,config.COMPLETE_COLOR) + test.log(str(instruction) + " Complete bullet") + else: + test.compare(bullet_circle_color, config.CURRENT_COLOR) + test.compare(bullet_border_color,config.INCOMPLETE_COLOR) + test.log(str(instruction) + " Incomplete bullet") + test.endSection() + +def convert_seconds_into_min_and_sec(seconds, time_format="%M:%S"): + """ + Method to convert seconds into minute format. + @param seconds - time in seconds. + @param time_format (str) - time format. + @return (int) - minute time + """ + seconds = int(seconds) + min_and_sec = time.strftime(time_format, time.gmtime(seconds)) + return min_and_sec + def verify_missing_object(object_to_check): """ Method to verify the given object is invisible or is not present on the screen @@ -73,5 +89,3 @@ def recirculate_rejection_msg(text): names.o_recirculate_rejection_msg["text"] = text return names.o_recirculate_rejection_msg - - Index: tst_recirculate/test.py =================================================================== diff -u -r571936f8ececab602e4b5cecc030d2571d62f5a4 -r454470a94a58be24a6fcec1263ee4af64f51a2d5 --- tst_recirculate/test.py (.../test.py) (revision 571936f8ececab602e4b5cecc030d2571d62f5a4) +++ tst_recirculate/test.py (.../test.py) (revision 454470a94a58be24a6fcec1263ee4af64f51a2d5) @@ -31,29 +31,6 @@ timer_default_value = 1 num_of_instructions = 3 -def verify_bullet_navigation(num, num_of_instructions, screen_obj): - """ - Method to verify status of bullets based - on number of instruction screen - @param num - (int) number of indicator - @param num_of_instructions- (int) count the number of instructions - @param object - screen_obj - (str) Screen object - """ - test.startSection("instruction bullet verification for screens") - for instruction in range(1, num_of_instructions): - bullet_children = object.children(waitForObjectExists(utility.get_bullet_object(screen_obj,(0 + instruction) - 1))) - bullet_circle_color = bullet_children[0].color.name - bullet_border_color = bullet_children[0].border.color.name - if instruction <= num: - test.compare(bullet_circle_color, config.COMPLETE_COLOR) - test.compare(bullet_border_color,config.COMPLETE_COLOR) - test.log(str(instruction) + " Complete bullet") - else: - test.compare(bullet_circle_color, config.CURRENT_COLOR) - test.compare(bullet_border_color,config.INCOMPLETE_COLOR) - test.log(str(instruction) + " Incomplete bullet") - test.endSection() - def verification_of_recirculate_recirculate_state(): """ Method to verify Treatment Recirculate Recirculate state screens @@ -67,7 +44,8 @@ test.startSection("Verifying Timer count down timer") for num in range(timer_default_value,count_down_value): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total = num, timeout_count_down = num) - min,sec = utility.convert_seconds_into_min_and_sec(num) + min = utility.convert_seconds_into_min_and_sec(num, time_format="%M") + sec = utility.convert_seconds_into_min_and_sec(num, time_format="%S") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_minute_Text).text),str(sec),"Verifying seconds appearing on UI") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") test.endSection() @@ -94,7 +72,8 @@ test.startSection("Verifying Timer count down timer") for num in range(timer_default_value,count_down_value): hd_simulator.cmd_send_treatment_recirculate_data(timeout_total = num, timeout_count_down = num) - min,sec = utility.convert_seconds_into_min_and_sec(num) + min = utility.convert_seconds_into_min_and_sec(num, time_format="%M") + sec = utility.convert_seconds_into_min_and_sec(num, time_format="%S") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_minute_Text).text),str(sec),"Verifying seconds appearing on UI") test.compare(str(waitForObject(names.o_EndTreatmentBase_TimeText_hour_Text).text),str(min),"Verifying minutes appearing on UI") test.endSection() @@ -111,7 +90,7 @@ test.startSection("verifying right arrow functionality for recirculate state Screen") utility.verify_missing_object(names.o_EndTreatmentBase_leftImage_Image) for indicator in range(1, num_of_instructions, 1): - verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + utility.verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) if indicator != num_of_instructions: mouseClick(waitForObject(names.o_EndTreatmentBase_rightImage_Image)) test.compare(str(waitForObjectExists(names.o_recirculate_text).text), config.RECIRCULATE_TEXT, "Recirculate text must be {}".format(config.RECIRCULATE_TEXT)) @@ -126,7 +105,7 @@ test.startSection("verifying left arrow functionality for recirculate state screens") utility.verify_missing_object(names.o_EndTreatmentBase_rightImage_Image) for indicator in range(num_of_instructions, 0, -1): - verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) + utility.verify_bullet_navigation(indicator, num_of_instructions, SCREEN_OBJ1) if indicator != 1: mouseClick(waitForObject(names.o_EndTreatmentBase_leftImage_Image)) test.compare(str(waitForObjectExists(names.o_recirculate_text).text), config.RECIRCULATE_TEXT, "Recirculate text must be {}".format(config.RECIRCULATE_TEXT))