Index: shared/scripts/configuration/config.py =================================================================== diff -u -r0c2ceabc7a0a2270006f1a210be811658d849c4c -rf8943fd4831755c59de02301e92eed5e2dc6eee5 --- shared/scripts/configuration/config.py (.../config.py) (revision 0c2ceabc7a0a2270006f1a210be811658d849c4c) +++ shared/scripts/configuration/config.py (.../config.py) (revision f8943fd4831755c59de02301e92eed5e2dc6eee5) @@ -17,7 +17,7 @@ AUT_NAME = "denaliSquish" -COMMON_PATH = f"{os.environ['HOME']}/Projects" +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", @@ -417,4 +417,11 @@ ALARM_BUTTONS_END_RESUME_RINSEBACK = ALARM_BUTTONS_RESUME_RINSEBACK_END +#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" + Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0c2ceabc7a0a2270006f1a210be811658d849c4c -rf8943fd4831755c59de02301e92eed5e2dc6eee5 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0c2ceabc7a0a2270006f1a210be811658d849c4c) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision f8943fd4831755c59de02301e92eed5e2dc6eee5) @@ -25,9 +25,6 @@ from configuration import config from dialin.ui.hd_simulator import HDSimulator - -hd = HDSimulator() - def start_application(app_name): """ @@ -46,28 +43,26 @@ test.log("Starting {}".format(app_name)) squish.startApplication(app_name) if counter == 1: - test.log(f"Application launched at the {counter}'st try.") + test.log("Application launched at the "+str(counter)+" st try.") elif counter == 2: - test.log(f"Application launched at the {counter}'nd try.") + test.log("Application launched at the "+str(counter)+" nd try.") elif counter == 3: - test.log(f"Application launched at the {counter}'rd try.") + test.log("Application launched at the "+str(counter)+" rd try.") else: - test.log(f"Application launched at the {counter}'th try.") + test.log("Application launched at the "+str(counter)+" th try.") break except RuntimeError: if counter == 1: - test.log(f"Application failed to launch after {counter} try - Please refer logs") + test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") elif counter == 20: - test.log(f"Exiting after {counter} tries..") + test.log("Exiting after "+str(counter)+ " tries..") sys.exit(1) else: - test.log(f"Application failed to launch after {counter} tries - Please refer logs") + test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") except: test.log("Failed to start the application") sys.exit(1) - - def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container @@ -90,7 +85,6 @@ return True return False - def scroll_to_zone(zone=None, screen_object=None): """ Index: shared/scripts/names.py =================================================================== diff -u -r0c2ceabc7a0a2270006f1a210be811658d849c4c -rf8943fd4831755c59de02301e92eed5e2dc6eee5 --- shared/scripts/names.py (.../names.py) (revision 0c2ceabc7a0a2270006f1a210be811658d849c4c) +++ shared/scripts/names.py (.../names.py) (revision f8943fd4831755c59de02301e92eed5e2dc6eee5) @@ -1,8 +1,8 @@ # encoding: UTF-8 + from objectmaphelper import * - # Top Parents o_QQuickView = { "type": "QQuickView"} o_Overlay = {"container": o_QQuickView, "type": "Overlay" } @@ -20,59 +20,28 @@ o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentBase", "type": "TreatmentFlowBase", "visible": True} o_PreTreatmentBase_titleBar_StepNavigationTitleBar = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_titleBar", "type": "StepNavigationTitleBar", "unnamed": 1, "visible": True} o_titleBar_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_titleBar", "type": "Rectangle", "unnamed": 1, "visible": True} +o_treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} +o_treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": o_treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} o_PreTreatmentBase_input_TextInput = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_PreTreatmentBase_CONFIRM_Text = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "text": "CONFIRM", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate = {"container": o_PreTreatmentCreateStack_PreTreatmentCreateStack, "objectName": "_PreTreatmentCreate", "type": "PreTreatmentCreate", "visible": True} o_PreTreatmentCreate_bloodFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRate", "type": "SliderCreateTreatment", "visible": True} o_PreTreatmentCreate_bloodFlowRateSlider_Slider = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_bloodFlowRateSlider", "type": "Slider", "visible": True} o_PreTreatmentCreate_dialysateFlowRate_SliderCreateTreatment = {"container": o_PreTreatmentCreateStack_PreTreatmentCreate_PreTreatmentCreate, "gradient": 0, "objectName": "_dialysateFlowRate", "type": "SliderCreateTreatment", "visible": True} o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase = {"container":o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase,"objectName":"_PreTreatmentBase","type":"TreatmentFlowBase", "visible": True} -back_b = {"container": o_PreTreatementCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": True} - -conform_c={"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} +o_treatmentStack_treatmentHome_TreatmentHome = {"container": o_treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} o_confirmButton_TouchRect = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": False} o_backButton_BackButton = {"container": o_Gui_MainView, "gradient": 0, "objectName": "_backButton", "type": "BackButton", "visible": False} o_NinePatchImage = {"container": o_Gui_MainView, "occurrence": 6, "type": "NinePatchImage", "unnamed": 1, "visible": False} o_PreTreatmentBase_backgroundRect_Rectangle = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "id": "_backgroundRect", "type": "Rectangle", "unnamed": 1, "visible": True} -keyBackground_Rectangle = {"container": o_Gui_MainView, "gradient": 0, "id": "keyBackground", "type": "Rectangle", "unnamed": 1, "visible": True} -t_Text = {"container": o_Gui_MainView, "text": "t", "type": "Text", "unnamed": 1, "visible": True} o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} #standbymode -patient_id = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} -standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} -displayed_time = {"container": o_Gui_MainView, "text": "01/06/2022 02:22:07", "type": "Text", "unnamed": 1, "visible": True} -create_treatment_rectangle = {"container": o_MainHome_MainHome, "gradient": 0, "id": "_createTreatmentRect", "type": "TouchRect", "unnamed": 1, "visible": True} -treatmentStack_TreatmentStack = {"container": o_Gui_MainView, "objectName": "TreatmentStack", "type": "TreatmentStack", "visible": True} -treatmentStack_TreatmentBloodPrime_ScreenItem = {"container": treatmentStack_TreatmentStack, "objectName": "_TreatmentBloodPrime", "type": "ScreenItem", "visible": True} +o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "unnamed": 1, "visible": True} -#in-treatment -blood_priming = {"container": treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} -blood_priming_value_by_default = {"container": treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} -treatmentStack_treatmentHome_TreatmentHome = {"container": treatmentStack_TreatmentStack, "id": "_treatmentHome", "type": "TreatmentHome", "unnamed": 1, "visible": True} -uf_minimum_value = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_value = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} -uf_maximum_title = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} -uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} -uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} -fluid_text = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} -cumulative_fluid_text = {"container": treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} -o_initialModeScreen_ScreenItem = {"container": o_Gui_MainView, "id": "_initialModeScreen", "type": "ScreenItem", "unnamed": 1, "visible": True} - - -#post screen -busy_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_busyIndicator", "source": "qrc:/images/iBusy", "type": "Image", "unnamed": 1, "visible": True} -done_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_checkIndicator", "source": "qrc:/images/iBusyDone", "type": "Image", "unnamed": 1, "visible": True} -fail_indicator = {"container": o_initialModeScreen_ScreenItem, "id": "_checkIndicator", "source": "qrc:/images/iBusyFail", "type": "Image", "unnamed": 1, "visible": True} -progress_bar = {"container": o_initialModeScreen_ScreenItem, "id": "_textMaximum", "type": "Text", "unnamed": 1, "visible": False} - - #alarm list o_alarm_list_container = {"container": o_Overlay, "id": "_flickable", "type": "Flickable", "unnamed": 1, "visible": True} o_notification_bar_alarm_list_button = {"container": o_Gui_MainView, "id": "_alarmListImage", "source": "qrc:/images/iList", "type": "Image", "unnamed": 1, "visible": True} @@ -121,10 +90,23 @@ o_okay_alarm = {"container": o_Overlay, "id": "_okay", "type": "TouchRect", "unnamed": 1, "visible": True} o_dismiss_alarm = {"container": o_Overlay, "id": "_silence", "type": "TouchRect", "unnamed": 1, "visible": True} +#in-treatment +o_blood_priming = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "Blood Priming", "type": "Text", "unnamed": 1, "visible": True} +o_blood_priming_value_by_default = {"container": o_treatmentStack_TreatmentBloodPrime_ScreenItem, "text": "0 mL", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_uf_minimum_value_pop_up = {"container": o_Overlay, "text": "0.000", "type": "Text", "unnamed": 1, "visible": True} +o_uf_maximum_value_pop_up = {"container": o_Overlay, "text": "0.600", "type": "Text", "unnamed": 1, "visible": True} +o_edit_uf_value = {"container": o_Overlay, "text": "EDIT ULTRAFILTRATION VOLUME", "type": "Text", "unnamed": 1, "visible": True} +o_uf_back_button = {"container": o_Overlay, "text": "BACK", "type": "Text", "unnamed": 1, "visible": True} +o_uf_close_button = {"container": o_Overlay, "id": "_image", "source": "qrc:/images/iClose", "type": "Image", "unnamed": 1, "visible": True} +o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} + \ No newline at end of file Index: suite.conf =================================================================== diff -u -r8df6f936193bbd9127d3ec940562e62db0060bcb -rf8943fd4831755c59de02301e92eed5e2dc6eee5 --- suite.conf (.../suite.conf) (revision 8df6f936193bbd9127d3ec940562e62db0060bcb) +++ suite.conf (.../suite.conf) (revision f8943fd4831755c59de02301e92eed5e2dc6eee5) @@ -1,6 +1,9 @@ AUT=denaliSquish +ENVVARS=envvars +HOOK_SUB_PROCESSES=false +IMPLICITAUTSTART=0 LANGUAGE=Python OBJECTMAPSTYLE=script -TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment +TEST_CASES=tst_environment tst_post tst_standbymode tst_In_treatment tst_ui_alarms_list tst_ui_alarms_dialog VERSION=3 WRAPPERS=Qt Index: tst_post/test.py =================================================================== diff -u -r53ce67a03db14c036e3134627621be58715eb17f -rf8943fd4831755c59de02301e92eed5e2dc6eee5 --- tst_post/test.py (.../test.py) (revision 53ce67a03db14c036e3134627621be58715eb17f) +++ tst_post/test.py (.../test.py) (revision f8943fd4831755c59de02301e92eed5e2dc6eee5) @@ -14,37 +14,19 @@ import names -# from time import sleep -from dialin.ui import utils -# from dialin.ui import unittests -from builtins import int as pyInt -from configuration.assertion_helper import * +from time import sleep +from dialin.ui import utils +from dialin.ui import unittests from dialin.ui.hd_simulator import HDSimulator -# from dialin.ui.dg_simulator import DGSimulator -# from dialin.ui.hd_simulator_alarms import HDAlarmsSimulator + MSGS_AND_CONDITIONS = { 5: [True, False], 10: [True, False], 2: [True, False], 18: [True, True], 7: [False, True], } - -assertion = AssertionHelper() + hd = HDSimulator() -#dg = DGSimulator() -def get_progress(): - """ - Method to obtain progress - @return: Progress value - """ - progress_bar = object.parent(waitForObjectExists(names.progress_bar)) - progress_bar_children = object.children(progress_bar) - progress_bar_val_parent = progress_bar_children[3] - progress_bar_val_parents_children = object.children(progress_bar_val_parent) - progress_bar_val = progress_bar_val_parents_children[1] - return progress_bar_val.text.toUtf8().constData() - - def verify_the_progress(value, final_msg_posted) -> None: """ Method to verify the progress