Index: suite_leahi/shared/scripts/configuration/config.py =================================================================== diff -u -r75e3ab588237239452761d2ec90e8b3aec6a916b -r8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff --- suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 75e3ab588237239452761d2ec90e8b3aec6a916b) +++ suite_leahi/shared/scripts/configuration/config.py (.../config.py) (revision 8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff) @@ -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']) @@ -24,10 +17,10 @@ "TD Serial Number", "DD Version", "DD FPGA Version", "DD Serial Number", ] #Device Settings Information Version -INFORMATION_SCREEN_TITLE_TEXT = "Information" -INFORMATION_TITLES = ["Information", "Versions"] +INFORMATION_SCREEN_TITLE_TEXT = "Device Information" +INFORMATION_TITLES = ["Versions", "Service"] VERSION_PARAMETERS = [ - "Information", "UI Version", "TD Version", "TD FPGA Version", + "OS Version", "UI Version", "TD Version", "TD FPGA Version", "TD Serial Number", "DD Version", "DD FPGA Version", "DD Serial Number" ] SERVICES_PARAMETERS = [ @@ -91,4 +84,15 @@ CONFIRM = "CONFIRM" NEXT ="Next" - +# 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?" \ No newline at end of file Index: suite_leahi/shared/scripts/configuration/navigation.py =================================================================== diff -u -r4de5be406334f420c6a7fe8cc6347d73f45ba74a -r8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff --- suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 4de5be406334f420c6a7fe8cc6347d73f45ba74a) +++ suite_leahi/shared/scripts/configuration/navigation.py (.../navigation.py) (revision 8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff) @@ -1,6 +1,6 @@ import names -import squish import test +import squish from leahi_dialin.ui.td_messaging import TD_Messaging from leahi_dialin.common.td_defs import TDOpModes, TDStandbyStates from configuration import config, utility @@ -30,4 +30,29 @@ "{} screen is displayed and Comparison of Device Settings Screen Title text".format( config.DEVICE_SETTINGS_SCREEN_TITLE_TEXT ), - ) \ No newline at end of file + ) + +def navigation_pageIndicator_step(vStep_name): + """ + Navigate to the specified page using the step indicator component. + + This method selects the given step from the page step indicator + Args: + vStep_name (str): The name of the step to navigate to as displayed + in the step indicator. + + """ + 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)); + test.log(str(input_field.text)) + 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 Index: suite_leahi/shared/scripts/configuration/utility.py =================================================================== diff -u -rc7d96b722594bb29a7bbc3689715b90af6e3d616 -r8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff --- suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision c7d96b722594bb29a7bbc3689715b90af6e3d616) +++ suite_leahi/shared/scripts/configuration/utility.py (.../utility.py) (revision 8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff) @@ -9,6 +9,14 @@ 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 + """ + return " ".join(('leahi', *args)) + def get_object_from_names(names_dict, error_message = "Missing object", timeout_ms = 200): """ @@ -190,10 +198,6 @@ return results - - - - def set_value_with_slider(value_field_obj, slider_obj,parameter): """ Opens the slider and moves it gradually to the target value (step of 10). @@ -277,4 +281,19 @@ return squish.waitForObject(names_dict, timeout_ms).text except LookupError: test.fail("ERROR : " + error_message) - return None \ No newline at end of file + return None +def findAllObjectsByText(parent, target_text): + """ + Recursively finds all child objects that have a 'text' property + """ + matching the target_text. Returns a list of matches. + results = [] + # Use hasattr to safely check for 'text' property before comparing + results.append(parent) + if hasattr(parent, 'text') and str(parent.text) == target_text: + + # Recurse through all children + for child in object.children(parent): + results.extend(findAllObjectsByText(child, target_text)) + + return results Index: suite_leahi/shared/scripts/names.py =================================================================== diff -u -r0e16f6d7e1f8349a7ccf945c666f6fdab7752d16 -r8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff --- suite_leahi/shared/scripts/names.py (.../names.py) (revision 0e16f6d7e1f8349a7ccf945c666f6fdab7752d16) +++ suite_leahi/shared/scripts/names.py (.../names.py) (revision 8f9df8e70510cbd35fcefa54812b16bf0ee0e3ff) @@ -224,3 +224,28 @@ o_preTreatmentStack_Text = {"container": o_preTreatmentStack_PreTreatmentStack, "type": "Text", "unnamed": 1 } o_preTreatmentStack_stepIndicator_StepIndicator = {"container": o_preTreatmentStack_PreTreatmentStack, "id": "_stepIndicator", "type": "StepIndicator", "unnamed": 1 } + +# Settings Service +o_SettingsStack_SettingsStack = {"container": o_Gui_MainView, "objectName": "_SettingsStack", "type": "SettingsStack", } +o_UserConfirmation_SettingsServicePassword = {"container": o_SettingsStack_SettingsStack, "objectName": "UserConfirmation", "type": "SettingsServicePassword" } +o_loginPage_Titletext = {"container": o_UserConfirmation_SettingsServicePassword, "id":"_titleText", "type": "Text", "unnamed": 1 } +o_userConfirmation_TextInput = {"container": o_UserConfirmation_SettingsServicePassword, "id": "_input", "type": "TextInput", "unnamed": 1 } +o_headerBar_HeaderBar = {"container": o_Gui_MainView, "id": "_headerBar", "type": "HeaderBar", "unnamed": 1 } +o_userConfirmation_ConfirmButton = {"container": o_UserConfirmation_SettingsServicePassword, "objectName": "_confirmButton", "type": "ConfirmButton" } +o_SettingsHome_confirmButton = {"container": o_SettingsHome, "objectName": "_confirmButton", "type": "ConfirmButton" } +o_SettingsBase_SettingsAdvancedMode = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsAdvancedMode" } +o_settingsAdvancedMode_BaseSwitch = {"checkable": True, "container": o_SettingsBase_SettingsAdvancedMode, "id": "_settingsAdvancedMode", "type": "BaseSwitch", "unnamed": 1 } +o_SettingsBase_backButton_AdvancedMode = {"container": o_SettingsBase_SettingsAdvancedMode, "objectName": "_backButton", "type": "BackButton" } +o_SettingsBase_SettingsDateTime = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsDateTime" } +o_SettingsBase_ntpSwitch_BaseSwitch = {"checkable": True, "container": o_SettingsBase_SettingsDateTime, "id": "_ntpSwitch", "type": "BaseSwitch", "unnamed": 1 } +o_SettingsBase_backButton_NTP_Switch = {"container": o_SettingsBase_SettingsDateTime, "objectName": "_backButton", "type": "BackButton" } +o_timeContainer_LabelUnitContainer = {"container": o_SettingsBase_SettingsDateTime, "id": "_timeContainer", "type": "LabelUnitContainer", "unnamed": 1 } +o_SettingsBase_SettingsRootSSHAccess = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsRootSSHAccess" } +o_SettingsBase_SSH_LoginSwitch = {"checkable": True, "container": o_SettingsBase_SettingsRootSSHAccess, "id": "_settingsRootSSHAccess_SSHDSwitch", "type": "BaseSwitch", "unnamed": 1 } +o_SettingsBase_Root_LoginSwitch = {"checkable": True, "container": o_SettingsBase_SettingsRootSSHAccess, "id": "_settingsRootSSHAccess_RootSwitch", "type": "BaseSwitch", "unnamed": 1 } +o_SettingsBase_backButton_RootSSH = {"container": o_SettingsBase_SettingsRootSSHAccess, "objectName": "_backButton", "type": "BackButton" } +o_userConfirmation_SettingsFactoryReset = {"container": o_Gui_MainView, "objectName": "UserConfirmation", "type": "SettingsFactoryReset" } +o_userConfirmation_backButton_FactoryReset = {"container": o_userConfirmation_SettingsFactoryReset, "objectName": "_backButton", "type": "BackButton" } +o_factoryReset_ConfirmButton = {"container": o_userConfirmation_SettingsFactoryReset, "objectName": "_confirmButton", "type": "ConfirmButton" } +o_cancelTouch_TouchRect = {"container": o_Overlay, "id": "_cancelTouch", "type": "TouchRect", "unnamed": 1 } +o_confirmTouch_ConfirmButton = {"container": o_Overlay, "id": "_confirmTouch", "type": "ConfirmButton", "unnamed": 1 } \ No newline at end of file