Index: suite_leahi/shared/scripts/configuration/config.py
===================================================================
diff -u -r75e3ab588237239452761d2ec90e8b3aec6a916b -rbcf6feedf17536d9d6720b159029e30e89244704
--- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 75e3ab588237239452761d2ec90e8b3aec6a916b)
+++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision bcf6feedf17536d9d6720b159029e30e89244704)
@@ -1,10 +1,3 @@
-# -S, --disable-sd-card-fail-log-stop disable-sd-card-fail-log-stop
-# -k, --enable-check-in-log Enables Check-In Log
-# -K, --enable-acknow-log Enables Acknowledgment Log
-
-AUT_NAME = "leahi -k -K -S -q"
-AUT_NAME_ONLY = "leahi" # Need only the AUT name for tst_ui_logs, do not add options
-
# Configuration application_init.py
TMP_DIR = "/tmp/"
APP_POST_LOG_LOCATION = "".join([str(TMP_DIR),'/post.log'])
@@ -87,8 +80,68 @@
COMPLETE = 'Complete'
HEPARIN = "Heparin"
CREATERX = "Rx"
-VALIDATE = "VALIDATE"
-CONFIRM = "CONFIRM"
-NEXT ="Next"
+VALIDATE = "Validate"
+CONFIRM = "Confirm"
+NEXT = "Next"
+AUTO_LOAD = 'Auto Load'
+WATER_SAMPLE = 'Water Sample'
+START = 'Start'
+AUTO_EJECT = 'Auto Eject'
+# Settings Service
+DEFAULT_SERVICE_PASSWORD_RAW = "Atal.Matal.22leh" # TODO need to update if we ever change the default
+NEW_PASSWORD_RAW = "Test4.Ksah.sk43sa"
+MANUFACTURING_SCREEN_TITLE_TEXT = "Manufacturing Setup"
+SERVICE_SCREEN_TITLE_TEXT = "Service"
+ADVANCED_MODES_SCREEN_TITLE_TEXT = "Advanced Mode"
+DATE_AND_TIME_SCREEN_TITLE_TEXT = "Date and Time"
+DATE_AND_TIME_PARAMETERS_TEXTS = ["NTP", "(Network Time Protocol)", "Time", "(HH:mm:ss)", "Date", "(MM/dd/yyyy)"]
+ENABLE_ROOT_SSH_SCREEN_TITLE_TEXT = "Enable Root SSH"
+ENABLE_ROOT_SSH_PARAMETERS_TEXTS = ["Enable SSH Login", "Enable Root Login"]
+FACTORY_RESET_SCREEN_TITLE_TEXT = "Factory Reset"
+FACTORY_RESET_SCREEN_TEXT = "Do you want to perform the factory reset?"
+#Blood Set Auto Load
+BLOOD_SET_AUTO_LOAD_REJECTION = "[1] Request is not allowed in the current operating mode"
+BLOOD_SET_AUTO_EJECT_REJECTION = "[1] Request is not allowed in the current operating mode"
+
+#Device Settings Options
+DEVICE_SETTINGS = "Device Settings"
+ADVANCED_MODE = "Advanced Mode"
+DEVICE_INFORMATION = "Device Information"
+WI_FI = "Wi-Fi"
+DEVICE_CLEANING = "Device Cleaning"
+SERVICE = "Service"
+EXPORT_LOGS = "Export Logs"
+VOLUME_AND_BRIGHTNESS = "Volume And Brightness"
+FEATURE_CONFIGURATIONS = "Feature Configurations"
+ADVANCED_INSTITUTIONAL_SETTINGS = "Advanced Institutional Settings"
+FACTORY_RESET = "Factory Reset"
+ENABLE_ROOT_SSH = "Enable Root SSH"
+INSTITUTIONAL_CONFIGURATIONS = "Institutional Configurations"
+DATE_AND_TIME = "Date and Time"
+LANGUAGE = "Language"
+
+#Menu Bar
+PRESCRIPTIONS = "Prescriptions"
+TREATMENT = "Treatment"
+SETTINGS = "Settings"
+
+#General Aesthetics 02 S24
+SYSTOLIC = "Systolic"
+DIASTOLIC = "Diastolic"
+HEARTRATE = "Heart Rate"
+
+SYSTOLIC_251 = "251"
+DIASTOLIC_201 = "201"
+HEARTRATE_181 = "181"
+
+SYSTOLIC_59 = "59"
+DIASTOLIC_39 = "39"
+HEARTRATE_39 = "39"
+RED_COLOR = "#c53b33"
+
+TOTAL_FLUID_DELIVERED = "Total Fluid Delivered"
+DELIVERING_FLUID = "Delivering Fluid"
+ULTRAFILTRATION_PAUSED_STATE = "Ultrafiltration Paused"
+ULTRAFILTRATION_COMPLETE_STATE = "Ultrafiltration Complete"
Index: suite_leahi/shared/scripts/configuration/navigation.py
===================================================================
diff -u -rc7d96b722594bb29a7bbc3689715b90af6e3d616 -rbcf6feedf17536d9d6720b159029e30e89244704
--- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision c7d96b722594bb29a7bbc3689715b90af6e3d616)
+++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision bcf6feedf17536d9d6720b159029e30e89244704)
@@ -1,9 +1,11 @@
import names
-import test
import squish
+import test
from leahi_dialin.ui.td_messaging import TD_Messaging
from leahi_dialin.common.td_defs import TDOpModes, TDStandbyStates
from configuration import config, utility
+from configparser import ConfigParser
+from pathlib import Path
td_simulator = TD_Messaging()
@@ -34,6 +36,49 @@
),
)
+def navigate_to_device_settings_using_service_password():
+ td_simulator.td_operation_mode(TDOpModes.MODE_SERV.value, 0)
+ grid_container = squish.waitForObject(names.o_DeviceSettingsGrid)
+ service_option = utility.findChildByText(grid_container, "Service")
+
+ if service_option is not None:
+ squish.mouseClick(service_option)
+
+ headerbar_container = squish.waitForObject(names.o_headerBar_HeaderBar)
+ service_screen_headerbar_title_text = utility.findChildByText(
+ headerbar_container, "Service"
+ )
+ if service_screen_headerbar_title_text is not None:
+ test.compare(
+ service_screen_headerbar_title_text.text,
+ config.SERVICE_SCREEN_TITLE_TEXT,
+ "{} screen is displayed and Comparison of Device Settings Screen Title text".format(
+ config.SERVICE_SCREEN_TITLE_TEXT
+ ),
+ )
+ input_field = squish.waitForObject(names.o_userConfirmation_TextInput, 1000)
+
+ squish.type(input_field, config.DEFAULT_SERVICE_PASSWORD_RAW)
+ confirm_button = squish.waitForObject(names.o_userConfirmation_ConfirmButton, 1000)
+ squish.mouseClick(confirm_button)
+
+def get_ini_value(conf_path: str , section: str, key: str):
+ """
+ Method to get the advanced option from the System.conf file
+ """
+ path = Path(conf_path)
+ if not path.exists():
+ raise FileNotFoundError(f"Not found: {path}")
+ parser = ConfigParser()
+ # Preserve case if needed:
+ # parser.optionxform = str
+ parser.read(path, encoding="utf-8")
+ if not parser.has_section(section):
+ raise KeyError(f"Section [{section}] not found in {path}")
+ if not parser.has_option(section, key):
+ raise KeyError(f"Key '{key}' not found in section [{section}]")
+ return parser.get(section, key)
+
def navigation_pageIndicator_step(vStep_name):
"""
Navigate to the specified page using the step indicator component.
@@ -46,15 +91,26 @@
"""
test.startSection("Method to navigation in the pretreatment page ")
stepId = squish.waitForObjectExists(names.o_preTreatmentStack_stepIndicator_StepIndicator)
- values = utility.findAllObjectsById(stepId, "_text")
- for index, input_field in enumerate(values[2:]):
- test.log(str(index));
+ stepnames = utility.findAllObjectsById(stepId, "_text")
+ value = get_ini_value("/home/denali/Public/luis/config/configurations/Settings/System.conf", section ="AdvancedMode", key ="AdvancedMode")
+ standard = stepnames[1:]
+ if value == "0":
+ standard = stepnames[3:]
+ Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT)
+ squish.mouseClick(squish.waitForObject(Nextbutton))
+
+ autoLoadbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text ="Auto Load")
+ squish.mouseClick(squish.waitForObject(autoLoadbutton))
+ td_simulator.td_blood_set_auto_load_response(vRejectionReason = 0)
+ for input_field in standard:
test.log(str(input_field.text))
+ if str(input_field.text) == "Water Sample":
+ squish.mouseClick(squish.waitForObject(names.o_PreTreatmentSampleStack_button_TouchRect))
+
if str(input_field.text) == vStep_name:
- test.log("Reached the target step")
break
else:
Nextbutton = utility.setObjectText(obj =names.o_preTreatmentStack_Text, text =config.NEXT)
squish.mouseClick(Nextbutton)
- test.endSection()
-
\ No newline at end of file
+
+ test.endSection()
\ No newline at end of file
Index: suite_leahi/shared/scripts/configuration/utility.py
===================================================================
diff -u -rc7d96b722594bb29a7bbc3689715b90af6e3d616 -rbcf6feedf17536d9d6720b159029e30e89244704
--- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision c7d96b722594bb29a7bbc3689715b90af6e3d616)
+++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision bcf6feedf17536d9d6720b159029e30e89244704)
@@ -3,14 +3,67 @@
import object
import names
from leahi_dialin.ui.td_messaging import TD_Messaging
-from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates
-from configuration import config, navigation
+from leahi_dialin.common.td_defs import TDOpModes,TDTreatmentStates
+from configuration import config, navigation
+from leahi_dialin.ui import utils
+from builtins import int as pyInt
td =TD_Messaging()
-from leahi_dialin.ui import utils
-from builtins import int as pyInt
+
+def aut(*args):
+ """
+ Joins the executable name and argument
+ into a single command string
+* Options:
+ * -h, --help Displays help on commandline options.
+ * --help-all Displays help including Qt specific
+ * options.
+ * -v, --version Displays version information.
+ * -c, --canOut Show the Can Frame Output
+ * -m, --msgOut Show the Message Output
+ * -l, --logOut Show the Logs Output
+ * -0, --enable-keep-awake Enable send low priority, empty message
+ * on the CANBus just to keep UI board CAN
+ * driver awake
+ * -i, --fake-interval Test fake message interval(ms)
+ * -f, --fake-message Test fake message data
+ * will use default sequenced long fake
+ * message if set to 00(default)
+ * will used only if correct integer value
+ * assigned for interval option
+ * -b, --fake-message-seq-at-begin Test fake message sequence at the
+ * beginning of the frame
+ * -u, --disable-unhandled-report Disable unhandled messages report as an
+ * error in the log
+ * -d, --disable-dialin-unhandled Disable the Dialin messages logged as
+ * unhandled
+ * -q, --disable-timeout Disables communication timeout
+ * -a, --disable-alarm-no-minimize Disables alarm no minimize
+ * -S, --disable-sd-card-fail-log-stop disable-sd-card-fail-log-stop
+ * -C, --disable-cloudsync-fail-stop disable-cloudsync-fail-stop
+ * -k, --disable-check-in-log Disables Check-In Log
+ * -K, --disable-acknow-log Disables Acknowledgment Log
+ * -D, --enable-dry-demo Enables Dry-Demo Mode
+ * -A, --active-can-bus Sets the Active CANBus [Shall start with
+ * 'can' or 'vcan]
+ * -E, --enable-manufacturing Enables the manufacturing mode to
+ * configure the system for the first time.
+ * -R, --use-root-home In case the application is not in
+ * Manufacturing Setup but needs to use root
+ * home folder for configurations.
+ * -U, --enable-update-mode Enables the update mode to update only
+ * necessary files during the update and
+ * keep the rest.
+ * -x, --use-log-long-name Use the log long file name format
+ * _