Index: shared/scripts/configuration/strings.py =================================================================== diff -u -rc79559a8ecd6dc676c7aed956ba1a5d1e45534a0 -r6f1e1819d6605964e7ba8366d0408cc26890be99 --- shared/scripts/configuration/strings.py (.../strings.py) (revision c79559a8ecd6dc676c7aed956ba1a5d1e45534a0) +++ shared/scripts/configuration/strings.py (.../strings.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) @@ -200,6 +200,7 @@ DEVICE_SETTINGS_SCREEN_PARAMETER = ["Information", "Volume And Brightness", "Wi-Fi", "Bluetooth Cuff", "DG Cleaning", "Service", "Export Logs"] #Service +DEFAULT_SERVICE_PASSWORD_RAW = "Atal.Matal.22leh" # TODO need to update if we ever change the default CLEAR_ALARM_CONDITION_TEXT = "Clear Alarm Condition" EXPORT_LOGS ="Export Logs" EXPORT_LOG_TEXT ="Export Logs" @@ -214,7 +215,9 @@ SettingsHome_Manager_Text = "Manager" SettingsHome_Settings_Text = "Settings" SERVICE_SCREEN_TITLE_TEXT = "Service" +SERVICES_TITLE_TEXT = "Service Password" + #main treatment screen VITALS_TITLE = "VITALS" PATIENT_ID = "demopatientid" Index: shared/scripts/names.py =================================================================== diff -u -rc79559a8ecd6dc676c7aed956ba1a5d1e45534a0 -r6f1e1819d6605964e7ba8366d0408cc26890be99 --- shared/scripts/names.py (.../names.py) (revision c79559a8ecd6dc676c7aed956ba1a5d1e45534a0) +++ shared/scripts/names.py (.../names.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) @@ -1094,3 +1094,10 @@ o_pretreatmentPrimeStack_preTreatmentDisposablesPrime_PreTreatmentBase = {"container": o_PreTreatmentStack_pretreatmentPrimeStack_PreTreatmentPrimeStack, "objectName": "_preTreatmentDisposablesPrime", "type": "PreTreatmentBase", "visible": True} o_preTreatmentDisposablesPrime_Prime_Text = {"container": o_pretreatmentPrimeStack_preTreatmentDisposablesPrime_PreTreatmentBase, "text": "Prime", "type": "Text", "unnamed": 1, "visible": True} +#service - date & time screen +o_SettingsBase_serviceScreen_TextInput_hours = {"container": o_SettingsHome_SettingsHome, "echoMode": 0, "id": "_input", "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_serviceScreen_TextInput_mins = {"container": o_SettingsHome_SettingsHome, "echoMode": 0, "id": "_input", "occurrence": 2, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_serviceScreen_TextInput_day = {"container": o_SettingsHome_SettingsHome, "echoMode": 0, "id": "_input", "occurrence": 4, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_serviceScreen_TextInput_month = {"container": o_SettingsHome_SettingsHome, "echoMode": 0, "id": "_input", "occurrence":3, "type": "TextInput", "unnamed": 1, "visible": True} +o_SettingsBase_serviceScreen_TextInput_year = {"container": o_SettingsHome_SettingsHome, "echoMode": 0, "id": "_input", "occurrence": 5, "type": "TextInput", "unnamed": 1, "visible": True} + Index: tst_settings_date_and_time/test.py =================================================================== diff -u -rc79559a8ecd6dc676c7aed956ba1a5d1e45534a0 -r6f1e1819d6605964e7ba8366d0408cc26890be99 --- tst_settings_date_and_time/test.py (.../test.py) (revision c79559a8ecd6dc676c7aed956ba1a5d1e45534a0) +++ tst_settings_date_and_time/test.py (.../test.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) @@ -63,15 +63,40 @@ return names.o_settings_date_and_time_text -def navigate_to_service_screen(): +def navigate_to_service_menu(): """ Method to navigate to "Service" screen """ - test.startSection("Navigating to 'Service' screen") + test.startSection("Navigating to 'Service' menu") hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_SERV.value, sub_mode=HDStandbyStates.STANDBY_START_STATE.value) utils.waitForGUI(0.5) service_screen_text = waitForObjectExists(service_text_obj(config.SERVICE_SCREEN_TITLE_TEXT)) test.compare(service_screen_text.text, config.SERVICE_SCREEN_TITLE_TEXT, "{} screen is displayed".format(config.SERVICE_SCREEN_TITLE_TEXT)) + test.compare(waitForObjectExists(names.o_service_text).text,config.SERVICE_TEXT, "{} screen is displayed".format(config.SERVICE_TEXT)) + mouseClick(waitForObjectExists(names.o_service_text)) + services_password_title = (waitForObjectExists(names.o_service_text_title).text) + test.compare(services_password_title, config.SERVICES_TITLE_TEXT, "{} should display once user is navigated to services password screen".format(config.SERVICES_TITLE_TEXT)) + utils.waitForGUI(0.5) + + #enter the password to access screen + test.log("Clicking on password entry field") + utils.waitForGUI(0.5) + mouseClick(waitForObjectExists(names.o_password_text_field)) + mouseClick(waitForObjectExists(names.o_switch_keyboard_to_keypad)) + password = config.DEFAULT_SERVICE_PASSWORD_RAW + type(waitForObject(names.o_password_text_field), str(password)) + mouseClick(waitForObjectExists(names.o_service_show_password)) + test.log("Verifying the entered password") + password = str((waitForObjectExists(names.o_password_text_field)).text) + test.compare(password, str(password), "Entered password should be {}".format(str(password))) + confirm_button = (waitForObjectExists(names.o_service_confirm_btn).text) + test.compare(confirm_button, config.CONFIRM_TEXT, "Button text should be {}".format(config.CONFIRM_TEXT)) + mouseClick(waitForObjectExists(names.o_service_confirm_btn)) + utils.waitForGUI(0.5) + + # HD response to advance to the service menu + hd_simulator.cmd_send_hd_operation_mode(op_mode=HDOpModes.MODE_SERV.value, sub_mode=HDStandbyStates.STANDBY_START_STATE.value) + test.endSection() @@ -124,59 +149,55 @@ date_row_children = object.children(date_row) time_title_text = time_row_children[TITLE_OBJECT_ITEM_NUMBER_0] date_title_text = date_row_children[TITLE_OBJECT_ITEM_NUMBER_0] + test.log("Verifying time title text") test.compare(time_title_text.text, TIME_TITLE, "{} should be the time title text".format(TIME_TITLE)) + test.log("Verifying date title text") test.compare(date_title_text.text, DATE_TITLE_TEXT, "{} should be the date title text".format(DATE_TITLE_TEXT)) hour_parent = time_row_children[1] hour_parent_children = object.children(hour_parent) - INPUT_FIELD_INDEX = 1 - hour_input_field = hour_parent_children[INPUT_FIELD_INDEX] - minute_parent = time_row_children[-1] - minute_parent_children = object.children(minute_parent) - minute_input_field = minute_parent_children[ INPUT_FIELD_INDEX] - test.log("Entering hour") + utils.waitForGUI(0.5) - mouseClick(hour_input_field) + + test.log("Entering hour") + hour_input_field = waitForObject(names.o_SettingsBase_serviceScreen_TextInput_hours) + mouseClick(waitForObject(hour_input_field)) utility.erase_entered_value(hour_input_field) utility.enter_keypad_value(hour) verify_valid_and_invalid_entry_and_its_color(entry=hour, date_time_parameter=HOUR_TEXT, input_field=hour_input_field) + test.log("Entering minute") + minute_input_field = waitForObject(names.o_SettingsBase_serviceScreen_TextInput_mins) mouseClick(minute_input_field) utility.erase_entered_value(minute_input_field) utility.enter_keypad_value(min) verify_valid_and_invalid_entry_and_its_color(entry=min, date_time_parameter=MINUTE_TEXT, input_field=minute_input_field) - MONTH_PARENT_INDEX = 1 - DAY_PARENT_INDEX = 3 - YEAR_PARENT_INDEX = -1 - month_parent = date_row_children[MONTH_PARENT_INDEX] - month_children = object.children(month_parent) - month_input_field = month_children[INPUT_FIELD_INDEX] - day_parent = date_row_children[DAY_PARENT_INDEX] - day_children = object.children(day_parent) - day_input_field = day_children[INPUT_FIELD_INDEX] - year_parent = date_row_children[YEAR_PARENT_INDEX] - year_children = object.children(year_parent) - year_input_field = year_children[INPUT_FIELD_INDEX] + test.log("Entering Month") + month_input_field = waitForObject(names.o_SettingsBase_serviceScreen_TextInput_month) mouseClick(month_input_field) utility.erase_entered_value(month_input_field) utility.enter_keypad_value(month) verify_valid_and_invalid_entry_and_its_color(entry=month, date_time_parameter=MONTH_TEXT, input_field=month_input_field) + test.log("Entering Day") + day_input_field = waitForObject(names.o_SettingsBase_serviceScreen_TextInput_day) mouseClick(day_input_field) utility.erase_entered_value(day_input_field) utility.enter_keypad_value(day) - verify_valid_and_invalid_entry_and_its_color(entry=day, date_time_parameter=DAY_TEXT, input_field=day_input_field, month=month) + verify_valid_and_invalid_entry_and_its_color(entry=day, date_time_parameter=DAY_TEXT, input_field=day_input_field, month=month, year=year) + test.log("Entering Year") + year_input_field = waitForObject(names.o_SettingsBase_serviceScreen_TextInput_year) mouseClick(year_input_field) utility.erase_entered_value(year_input_field) utility.enter_keypad_value(year) verify_valid_and_invalid_entry_and_its_color(entry=year, date_time_parameter=YEAR_TEXT, input_field=year_input_field) verify_confirm_btn(valid_parameter_passed) test.endSection() -def verify_valid_and_invalid_entry_and_its_color(entry, date_time_parameter, input_field, month=None): +def verify_valid_and_invalid_entry_and_its_color(entry, date_time_parameter, input_field, month=None, year=None): """ Method to verify the valid and invalid entry of date and time and its color @@ -207,7 +228,7 @@ elif date_time_parameter is DAY_TEXT: if(month == 4 or month == 6 or month == 9 or month == 11): day_upper_limit = DAY_UPPER_LIMIT - 1 - elif(month == 2 and isleap(date_time_parameter is YEAR_TEXT)): + elif(month == 2 and year!=None and isleap(year)): day_upper_limit = DAY_UPPER_LIMIT - 2 elif(month == 2): day_upper_limit = DAY_UPPER_LIMIT - 3 @@ -262,10 +283,9 @@ startApplication(config.AUT_NAME+ " -l") - navigate_to_service_screen() + navigate_to_service_menu() navigate_to_set_date_and_time() - verify_back_btn() verify_entered_date_and_time(hour="24", min="33", day="1", month="3", year="2022", valid_parameter_passed=config.INVALID) verify_entered_date_and_time(hour="00", min="60", day="29", month="2", year="2020", valid_parameter_passed=config.INVALID) verify_entered_date_and_time(hour="13", min="33", day="32", month="2", year="2022", valid_parameter_passed=config.INVALID) Index: tst_settings_information/test.py =================================================================== diff -u -r06fda637e04ce27ea414ba8ad06af92c4b76d788 -r6f1e1819d6605964e7ba8366d0408cc26890be99 --- tst_settings_information/test.py (.../test.py) (revision 06fda637e04ce27ea414ba8ad06af92c4b76d788) +++ tst_settings_information/test.py (.../test.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) @@ -21,7 +21,7 @@ from dialin.utils.conversions import unsigned_integer_to_bytearray from dialin.ui.hd_simulator import HDSimulator from dialin.ui.dg_simulator import DGSimulator -from configuration.config import SERVICE_CONF_LOCATION +from configuration.config import SERVICE_CONF_LOCATION, SERVICES_TITLE_TEXT from dialin.common.hd_defs import HDOpModes,HDStandbyStates from dialin.ui import utils from builtins import float as pyfloat @@ -54,7 +54,6 @@ BRIGHTNESS_BUFFER = 20 VOLUME_BUFFER = 20 VOLUME_RANGE = [80, 40, 20, 100, 60] -SERVICES_TITLE_TEXT = "Service Password" INCORRECT_PASSWORD = "abcd" INCORRECT_PASSWORD_MSG = "Incorrect password" IP_ADRESS_TEXT_INDEX = 1 @@ -571,7 +570,7 @@ test.compare(waitForObjectExists(names.o_service_text).text,config.SERVICE_TEXT, "{} screen is displayed".format(config.SERVICE_TEXT)) mouseClick(waitForObjectExists(names.o_service_text)) services_password_title = (waitForObjectExists(names.o_service_text_title).text) - test.compare(services_password_title, SERVICES_TITLE_TEXT, "{} should display once user is navigated to services password screen".format(SERVICES_TITLE_TEXT)) + test.compare(services_password_title, config.SERVICES_TITLE_TEXT, "{} should display once user is navigated to services password screen".format(config.SERVICES_TITLE_TEXT)) utils.waitForGUI(0.5) verify_incorrect_password_response() utils.waitForGUI(0.5) Index: tst_ui_logs/test.py =================================================================== diff -u -rc79559a8ecd6dc676c7aed956ba1a5d1e45534a0 -r6f1e1819d6605964e7ba8366d0408cc26890be99 --- tst_ui_logs/test.py (.../test.py) (revision c79559a8ecd6dc676c7aed956ba1a5d1e45534a0) +++ tst_ui_logs/test.py (.../test.py) (revision 6f1e1819d6605964e7ba8366d0408cc26890be99) @@ -1664,7 +1664,7 @@ """ application_init.setup_post_log_successful_start() - startApplication(config.AUT_NAME_ONLY + "-q"+" -d"+ " -i"+ " -f"+ " -b"+ " -u"+ " -c"+ " -0"+ " -m") + startApplication(config.AUT_NAME_ONLY + " -q"+" -d"+ " -i"+ " -f"+ " -b"+ " -u"+ " -c"+ " -0"+ " -m") verif_ui_logs_api() #TODO need to figure out a better way to do this missing path verification. The current