Index: shared/scripts/configuration/config.py =================================================================== diff -u -r2dcf9ca847eefd278ba8e883b521324d553947fa -rad324b2834285a29c4458b100317f76eaf64fc6a --- shared/scripts/configuration/config.py (.../config.py) (revision 2dcf9ca847eefd278ba8e883b521324d553947fa) +++ shared/scripts/configuration/config.py (.../config.py) (revision ad324b2834285a29c4458b100317f76eaf64fc6a) @@ -40,36 +40,23 @@ #Setting -SettingsHome_Clear_Alarm_Condition_Text = "Clear Alarm Condition" -SettingsHome_Export_Text ="Export" -SettingsHome_Device_Settings_Text = "Device Settings" -SettingsHome_Information_Text = "Information" -SettingsHome_Volume_And_Brightness_Text = "Volume And Brightness" -SettingsHome_Wi_Fi_Text = "Wi-Fi" -SettingsHome_Bluetooth_Cuff_Text = "Bluetooth Cuff" -SettingsHome_Dialysate_Generator_Settings_Text = "Dialysate Generator Settings" -SettingsHome_Services_Text = "Services" +CLEAR_ALARM_CONDITION_TEXT = "Clear Alarm Condition" +EXPORT_TEXT ="Export" +DEVICE_SETTINGS_TEXT = "Device Settings" +DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "Dialysate Generator Settings", "Services"] SettingsHome_Treatment_Text = "Treatment" SettingsHome_Manager_Text = "Manager" SettingsHome_Settings_Text = "Settings" #Information -SettingsBase_Information_Text = "Information" -SettingsBase_Versions_Text = "Versions" -SettingsBase_UI_Version_Text = "UI Version" -SettingsBase_HD_Version_Text = "HD Version" -SettingsBase_HD_FPGA_Version_Text = "HD FPGA Version" -SettingsBase_HD_Serial_Number_Text = "HD Serial Number" -SettingsBase_DG_Version_Text = "DG Version" -SettingsBase_DG_FPGA_Version_Text = "DG FPGA Version" -SettingsBase_DG_Serial_Number = "DG Serial Number" -SettingsBase_Services_Text = "Services" -SettingsBase_HD_Last_Service_Date_Text = "HD Last Service Date" -SettingsBase_HD_Next_Service_Date_Text = "HD Next Service Date" -SettingsBase_DG_Last_Service_Date_Text = "DG Last Service Date" -SettingsBase_DG_Next_Service_Date_Text = "DG Next Service Date" +INFORMATION_TITLES = ["Information", "Versions"] +INFORMATION_PARAMETERS = ["Information", "UI Version", "HD Version", "HD FPGA Version", "HD Serial Number", "DG Version", "DG FPGA Version", "DG Serial Number"] +SERIVCES_TITLE = "Services" +SERVICES_PARAMETERS = ["HD Last Service Date", "HD Next Service Date", "DG Last Service Date", "DG Next Service Date"] +ENABLED = True +DISABLED = False @@ -81,3 +68,4 @@ + Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r0cc92d3b75bfb96dc4ecafd760a9ce15e455033b -rad324b2834285a29c4458b100317f76eaf64fc6a --- shared/scripts/configuration/utility.py (.../utility.py) (revision 0cc92d3b75bfb96dc4ecafd760a9ce15e455033b) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision ad324b2834285a29c4458b100317f76eaf64fc6a) @@ -12,50 +12,13 @@ # ############################################################################ - +import names import sys import test import squish from configuration import config from builtins import int as pyInt - - -def start_application(app_name): - """ - Function to start application and verify application status [running] - If application does not start or running status is false, test stops - Argument: - @param app_name : (str) - Name of the application - @param app_executable : (str) - Actual application - @return: handle for the application if the application is in running state, - or error (exist the application) - """ - counter = 0 - while True: - try: - counter += 1 - test.log("Starting {}".format(app_name)) - squish.startApplication(app_name) - if counter == 1: - test.log("Application launched at the "+str(counter)+" st try.") - elif counter == 2: - test.log("Application launched at the "+str(counter)+" nd try.") - elif counter == 3: - test.log("Application launched at the "+str(counter)+" rd try.") - else: - test.log("Application launched at the "+str(counter)+" th try.") - break - except RuntimeError: - if counter == 1: - test.log("Application failed to launch after "+str(counter)+" try - Please refer logs") - elif counter == 20: - test.log("Exiting after "+str(counter)+ " tries..") - sys.exit(1) - else: - test.log("Application failed to launch after "+str(counter)+ " tries - Please refer logs") - except: - logErrorDetails("Failed to start the application") - sys.exit(1) +from cgitb import text def check_if_object_is_within_the_container(obj=None, container=None): @@ -108,3 +71,4 @@ raise LookupError("zone object is not in view to the user after " + \ "trying 100 times") + Index: shared/scripts/names.py =================================================================== diff -u -r2dcf9ca847eefd278ba8e883b521324d553947fa -rad324b2834285a29c4458b100317f76eaf64fc6a --- shared/scripts/names.py (.../names.py) (revision 2dcf9ca847eefd278ba8e883b521324d553947fa) +++ shared/scripts/names.py (.../names.py) (revision ad324b2834285a29c4458b100317f76eaf64fc6a) @@ -1,26 +1,65 @@ # encoding: UTF-8 +# encoding: UTF-8 + + from objectmaphelper import * -#settings_Home o_Gui_MainView = {"type": "Gui::MainView", "unnamed": 1, "visible": True} +o_Overlay = {"container": o_Gui_MainView, "type": "Overlay", "unnamed": 1, "visible": True} +o_borderRect_Rectangle = {"container": o_Overlay, "gradient": 0, "id": "_borderRect", "type": "Rectangle", "unnamed": 1, "visible": True} +o_minimizeButton_UpDownButton = {"container": o_Overlay, "gradient": 0, "id": "_minimizeButton", "type": "UpDownButton", "unnamed": 1, "visible": True} +o_shape_Shape = {"container": o_Gui_MainView, "id": "_shape", "type": "Shape", "unnamed": 1, "visible": True} +o_PreTreatmentCreateStack_PreTreatmentCreateStack = {"container": o_Gui_MainView, "objectName": "_PreTreatmentCreateStack", "type": "PreTreatmentCreateStack", "visible": True} +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} +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} +o_PreTreatmentBase_confirmButton_TouchRect = {"container": o_PreTreatmentCreateStack_PreTreatmentBase_TreatmentFlowBase, "gradient": 0, "objectName": "_confirmButton", "type": "TouchRect", "visible": True} + + +#standbymode +o_MainHome_MainHome = {"container": o_Gui_MainView, "objectName": "_MainHome", "type": "MainHome", "visible": True} +o_standby_page = {"container": o_MainHome_MainHome, "type": "Column", "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} + + +#settings_Home o_settings_Text = {"container": o_Gui_MainView, "text": "Settings", "type": "Text", "unnamed": 1, "visible": True} o_SettingsHome_SettingsHome = {"container": o_Gui_MainView, "objectName": "_SettingsHome", "type": "SettingsHome", "visible": True} -o_SettingsHome_image_Image = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} -o_SettingsHome_Clear_Alarm_Condition_Text = {"container": o_SettingsHome_SettingsHome, "text": "Clear Alarm Condition", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Export_Text = {"container": o_SettingsHome_SettingsHome, "text": "Export", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_image_Image_2 = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} -o_SettingsHome_Device_Settings_Text = {"container": o_SettingsHome_SettingsHome, "text": "Device Settings", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Information_Text = {"container": o_SettingsHome_SettingsHome, "text": "Information", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Volume_And_Brightness_Text = {"container": o_SettingsHome_SettingsHome, "text": "Volume And Brightness", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Wi_Fi_Text = {"container": o_SettingsHome_SettingsHome, "text": "Wi-Fi", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Bluetooth_Cuff_Text = {"container": o_SettingsHome_SettingsHome, "text": "Bluetooth Cuff", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Dialysate_Generator_Settings_Text = {"container": o_SettingsHome_SettingsHome, "text": "Dialysate Generator Settings", "type": "Text", "unnamed": 1, "visible": True} -o_SettingsHome_Services_Text = {"container": o_SettingsHome_SettingsHome, "text": "Services", "type": "Text", "unnamed": 1, "visible": True} -o_treatment_Text = {"container": o_Gui_MainView, "text": "Treatment", "type": "Text", "unnamed": 1, "visible": True} -o_manager_Text = {"container": o_Gui_MainView, "text": "Manager", "type": "Text", "unnamed": 1, "visible": True} -#Information +o_settings_home_text_obj = {"container": o_SettingsHome_SettingsHome, "type": "Text", "unnamed": 1, "visible": True} +o_eject_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iEject", "type": "Image", "unnamed": 1, "visible": True} +o_arrow_btn = {"container": o_SettingsHome_SettingsHome, "id": "_image", "source": "qrc:/images/iArrowRight", "type": "Image", "unnamed": 1, "visible": True} o_SettingsBase_SettingsBase = {"container": o_Gui_MainView, "objectName": "_SettingsBase", "type": "SettingsBase", "visible": True} +o_settings_base_text_obj = {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +#Information + o_SettingsBase_Information_Text = {"container": o_SettingsBase_SettingsBase, "text": "Information", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_Versions_Text = {"container": o_SettingsBase_SettingsBase, "text": "Versions", "type": "Text", "unnamed": 1, "visible": True} o_SettingsBase_UI_Version_Text = {"container": o_SettingsBase_SettingsBase, "text": "UI Version", "type": "Text", "unnamed": 1, "visible": True} Index: tst_settings_information/test.py =================================================================== diff -u -r2dcf9ca847eefd278ba8e883b521324d553947fa -rad324b2834285a29c4458b100317f76eaf64fc6a --- tst_settings_information/test.py (.../test.py) (revision 2dcf9ca847eefd278ba8e883b521324d553947fa) +++ tst_settings_information/test.py (.../test.py) (revision ad324b2834285a29c4458b100317f76eaf64fc6a) @@ -11,68 +11,114 @@ # author Papiya Mandal # author Akshay Dhawan - import names -import datetime -import test -from dialin.ui import utils -from configuration import config,utility + +from configuration import config, utility from dialin.ui.hd_simulator import HDSimulator from dialin.common.hd_defs import HDOpModes +from dialin.ui import utils hd_simulator = HDSimulator() + +def settings_text_obj(text): + names.o_settings_home_text_obj["text"] = text + return names.o_settings_home_text_obj -def verify_settings_parameters(): +def settings_base_text_obj(text): + names.o_settings_base_text_obj["text"] = text + return names.o_settings_base_text_obj + +def verify_clear_alarm_condition_button(): + """ + Method to verify the 'Clear Alarm Condition' button + """ + test.startSection("Verifying Clear Alarm Condition button") + clear_condition_button = waitForObjectExists(settings_text_obj(config.CLEAR_ALARM_CONDITION_TEXT)) + test.compare(clear_condition_button.text, config.CLEAR_ALARM_CONDITION_TEXT, "Clear Alarm Condition button text should be {}".format(config.CLEAR_ALARM_CONDITION_TEXT)) + test.compare(clear_condition_button.enabled, config.ENABLED, "Clear Alarm Condition button should be enabled") + test.endSection() - test.compare(str(waitForObjectExists(names.o_SettingsHome_Clear_Alarm_Condition_Text).text), config.SettingsHome_Clear_Alarm_Condition_Text, "Text should be Clear Alarm Condition") - test.compare(waitForObject(names.o_SettingsHome_Clear_Alarm_Condition_Text).enabled, True, "Clear Alarm Condition button should be enabled") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Export_Text).text), config.SettingsHome_Export_Text, "Text should be Export") - test.compare(waitForObject(names.o_SettingsHome_Export_Text).enabled, True, "Export button should be enabled") - test.compare(waitForObject(names.o_SettingsHome_image_Image_2).enabled, True, "UP button should be enabled") - mouseClick(waitForObjectExists(names.o_SettingsHome_image_Image_2)) - utils.waitForGUI(1) -# test.compare(waitForObject(names.o_SettingsHome_Export_Text).enabled, False, "Export button should be disabled") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Device_Settings_Text).text), config.SettingsHome_Device_Settings_Text, "Text should be Device Settings") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Information_Text).text), config.SettingsHome_Information_Text, "Text should be Information") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Volume_And_Brightness_Text).text), config.SettingsHome_Volume_And_Brightness_Text, "Text should be Volume And Brightness") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Wi_Fi_Text).text), config.SettingsHome_Wi_Fi_Text, "Text should be Wi-Fi") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Bluetooth_Cuff_Text).text), config.SettingsHome_Bluetooth_Cuff_Text, "Text should be Bluetooth Cuff") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Dialysate_Generator_Settings_Text).text), config.SettingsHome_Dialysate_Generator_Settings_Text, "Text should be Dialysate Generator Settings") - test.compare(str(waitForObjectExists(names.o_SettingsHome_Services_Text).text), config.SettingsHome_Services_Text, "Text should be Services") - test.compare(str(waitForObjectExists(names.o_treatment_Text).text), config.SettingsHome_Treatment_Text, "Text should be Treatment") - test.compare(str(waitForObjectExists(names.o_manager_Text).text), config.SettingsHome_Manager_Text, "Text should be Manager") - test.compare(str(waitForObjectExists(names.o_settings_Text).text), config.SettingsHome_Settings_Text, "Text should be Settings") +def verify_export_button(state): + """ + Method to verify the 'Export' button + """ + test.startSection("Verifying Export button") + export_btn = waitForObjectExists(settings_text_obj(config.EXPORT_TEXT)) + test.compare(export_btn.text, config.EXPORT_TEXT, "Export button text should be {}".format(config.EXPORT_TEXT)) + if state == config.ENABLED: + test.compare(export_btn.enabled, config.ENABLED, "Export button should be enabled") + else: + test.compare(export_btn.enabled, config.DISABLED, "Export button should be disabled") + test.endSection() -def verify_information(): +def verify_settings_parameters(): + """ + Method to verify the buttons + and parameters of 'Device Settings screen + """ + test.startSection("Verify the buttons and parameters of 'Device Settings' screen") - test.compare(str(waitForObjectExists(names.o_SettingsBase_Information_Text).text), config.SettingsBase_Information_Text, "Text should be Information") - test.compare(str(waitForObjectExists(names.o_SettingsBase_Versions_Text).text), config.SettingsBase_Versions_Text, "Text should be Versions") - test.compare(str(waitForObjectExists(names.o_SettingsBase_UI_Version_Text).text), config.SettingsBase_UI_Version_Text, "Text should be UI Version") - test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Version_Text).text), config.SettingsBase_HD_Version_Text, "Text should be HD Version") - test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_FPGA_Version_Text).text), config.SettingsBase_HD_FPGA_Version_Text, "Text should be HD FPGA Version") - test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Serial_Number_Text).text), config.SettingsBase_HD_Serial_Number_Text, "Text should be HD Serial Number") - test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Version_Text).text), config.SettingsBase_DG_Version_Text, "Text should be DG Version") - test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_FPGA_Version_Text).text), config.SettingsBase_DG_FPGA_Version_Text, "Text should be DG FPGA Version") - test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Serial_Number).text), config.SettingsBase_DG_Serial_Number, "Text should be DG Serial Number") - test.compare(str(waitForObjectExists(names.o_SettingsBase_Services_Text).text), config.SettingsBase_Services_Text, "Text should be Services") - test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Last_Service_Date_Text).text), config.SettingsBase_HD_Last_Service_Date_Text, "Text should be HD Last Service Date") - test.compare(str(waitForObjectExists(names.o_SettingsBase_HD_Next_Service_Date_Text).text), config.SettingsBase_HD_Next_Service_Date_Text, "Text should be HD Next Service Date") - test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Last_Service_Date_Text).text), config.SettingsBase_DG_Last_Service_Date_Text, "Text should be DG Last Service Date") - test.compare(str(waitForObjectExists(names.o_SettingsBase_DG_Next_Service_Date_Text).text), config.SettingsBase_DG_Next_Service_Date_Text, "Text should be DG Next Service Date") + verify_clear_alarm_condition_button() + mouseClick(waitForObjectExists(settings_text_obj(config.CLEAR_ALARM_CONDITION_TEXT))) + verify_export_button(config.ENABLED) + mouseClick(waitForObjectExists(settings_text_obj(config.EXPORT_TEXT))) + + eject_btn = waitForObject(names.o_eject_btn) + test.compare(eject_btn.enabled, config.ENABLED, "Eject button should be enabled") + mouseClick(eject_btn) + test.log("Verifying the state of 'Export' button after clicking on Eject button") + verify_export_button(config.DISABLED) + + for parameter in config.DEVICE_SETTINGS_SCREEN_PARAMETER: + parameter_text = waitForObjectExists(settings_text_obj(parameter)) + test.compare(parameter_text.text, parameter, "{} should be available under 'Device Settings' screen".format(parameter)) + test.endSection() +def verify_parameters_under_information(): + """ + Method to verify the parameter under 'Information'\ + and 'Services' + """ + test.startSection("Verify the parameter under 'Information' and 'Services'") + test.log("Navigating to 'Information' screen") + mouseClick(waitForObjectExists(names.o_arrow_btn)) + for title in config.INFORMATION_TITLES: + title_text = waitForObjectExists(settings_base_text_obj(title)) + test.compare(title_text.text, title, "{} should be available".format(title)) + + for info_parameter in config.INFORMATION_PARAMETERS: + info_parameter_text = waitForObjectExists(settings_base_text_obj(info_parameter)) + test.compare(info_parameter_text.text, info_parameter, "{} should be available under 'Information'".format(info_parameter)) + + test.log("Verifying 'Serivces title and") + services_text = waitForObjectExists(settings_base_text_obj(config.SERIVCES_TITLE)) + test.compare(services_text.text, config.SERIVCES_TITLE, "Services title should be {}".format(config.SERIVCES_TITLE)) + + for services_parameter in config.SERVICES_PARAMETERS: + services_par_text = waitForObjectExists(settings_base_text_obj(services_parameter)) + test.compare(services_par_text.text, services_parameter, "{} should be available under services".format(services_parameter)) + test.endSection() + +def navigate_to_settings_screen(): + """ + Method to navigate to "Settings" screen + """ + test.startSection("Navigating to 'Device Settings' screen") + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_STAN.value, sub_mode=HDOpModes.MODE_FAUL.value) + utils.waitForGUI(1) + mouseClick(waitForObjectExists(names.o_settings_Text)) + device_settings_text = waitForObjectExists(settings_text_obj(config.DEVICE_SETTINGS_TEXT)) + test.compare(device_settings_text.text, config.DEVICE_SETTINGS_TEXT, "{} screen is displayed".format(config.DEVICE_SETTINGS_TEXT)) + test.endSection() + def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME) - hd_simulator.cmd_send_hd_operation_mode(op_mode = 3, sub_mode = 0) - mouseClick(waitForObjectExists(names.o_settings_Text)) + + navigate_to_settings_screen() verify_settings_parameters() - mouseClick(waitForObjectExists(names.o_SettingsHome_image_Image)) #clicking on Information arrow mark - verify_information() + verify_parameters_under_information() utils.tstDone() - - - - \ No newline at end of file