Index: tst_service_screen/test.py =================================================================== diff -u -rf24d9f0bfc30fa024ceef73cb8b25efb86a70f70 -r9cb75f8b54e08f5f0ca42befd3c35ae5aea84c68 --- tst_service_screen/test.py (.../test.py) (revision f24d9f0bfc30fa024ceef73cb8b25efb86a70f70) +++ tst_service_screen/test.py (.../test.py) (revision 9cb75f8b54e08f5f0ca42befd3c35ae5aea84c68) @@ -17,6 +17,7 @@ from dialin.ui.hd_simulator import HDSimulator from dialin.common.hd_defs import HDOpModes, HDStandbyStates from dialin.ui import utils +from configuration import utility hd_simulator = HDSimulator() @@ -192,6 +193,7 @@ def verify_export_logs_screen(): """ Method to verify the export logs screen + Note overall export log functionality is tested in tst_service_export_logs """ test.startSection("Verifying the the export logs screen") test.log("Navigating to service screen to export log screen") @@ -245,19 +247,44 @@ test.log("verification of progress bar color after exporting data") test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle).color.name, config.RED_COLOR,"{} color progress bar is displayed for sd-card".format(config.RED_COLOR)) test.compare(waitForObjectExists(names.o_SettingsBase_progressCircle_ProgressCircle_2).color.name, config.RED_COLOR,"{} color progress bar is displayed for usb-drive".format(config.RED_COLOR)) - + + mouseClick(waitForObjectExists(names.o_SettingsBase_backbutton_service_information_mouseArea_MouseArea_2)) test.endSection() + +def verify_water_input_subscreen(): + expected_screen_title = "Water Input Mode" + test.startSection("Navigating 'Set Date And Time' screen") + service_subScreen_menu_element = utility.get_object_from_names(names.o_SettingsHome_touchItem_TouchRect_2, error_message="subscreen menu element not found") + if service_subScreen_menu_element is not None: + mouseClick(service_subScreen_menu_element) + utils.waitForGUI(0.5) + subscreenTitle = utility.get_object_from_names(names.o_SettingsBase_Water_Input_Mode_Text, error_message=f"{expected_screen_title} object is missing") + if subscreenTitle is not None: + test.compare(subscreenTitle.text, expected_screen_title, "{} should be displayed when user is navigated to this screen".format(expected_screen_title)) + + pure_water_mode_switch = utility.get_object_from_names(names.o_SettingsBase_settingsRoInputSwitch_Switch, error_message = "RO Switch object not found") + if pure_water_mode_switch is not None: + test.compare(pure_water_mode_switch.checked, False, "Pure water mode switch value should be False") + utils.waitForGUI(0.5) + mouseClick(pure_water_mode_switch) + utils.waitForGUI(0.5) + test.compare(pure_water_mode_switch.checked, True, "Pure water mode switch value should be True") + + # done, go back to main screen + back_button_obj = utility.get_object_from_names(names.o_SettingsBase_backbutton_service_information_mouseArea_MouseArea_2, error_message = "Water input screen back button object missing") + if back_button_obj is not None: + mouseClick(back_button_obj) + utils.waitForGUI(0.5) + test.endSection() + def main(): utils.tstStart(__file__) startApplication(config.AUT_NAME+ " -l") navigate_to_settings_screen() verify_settings_parameters() - - # To avoid issues with the mouse cick due to the alarm dialog - Remove if the alarm dialog no longer shown on app start - mouseClick(waitForObject(names.o_minimize_button)) - + verify_parameters_under_information() verify_volume_and_brightness_section() verify_wifi_setting() @@ -266,7 +293,10 @@ verify_dg_cleaning_setting() verify_export_logs_screen() verify_export_functionality() + verify_water_input_subscreen() + #Note the protected service menu items (factory reset, decommission, etc) are in tst_service_menu + utils.tstDone()