Index: tst_service_protected_menu/test.py =================================================================== diff -u -r9cb75f8b54e08f5f0ca42befd3c35ae5aea84c68 -re3f67a6e78d267bb99596ba1ce439c6fe7d89a25 --- tst_service_protected_menu/test.py (.../test.py) (revision 9cb75f8b54e08f5f0ca42befd3c35ae5aea84c68) +++ tst_service_protected_menu/test.py (.../test.py) (revision e3f67a6e78d267bb99596ba1ce439c6fe7d89a25) @@ -186,6 +186,8 @@ test.compare(confirmation_title.text, expected_title, "Checking the confirm dialog message string") # check dialog message + if names.o_service_confirmation_are_you_sure_TitleText["text"] is not expected_message: + names.o_service_confirmation_are_you_sure_TitleText["text"] = expected_message confirmation_message = utility.get_object_from_names(names.o_service_confirmation_are_you_sure_TitleText, error_message = "Confirmation dialog message object not found") if confirmation_message is not None: test.compare(confirmation_message.text, expected_message, "Checking the confirm dialog message string") @@ -294,9 +296,30 @@ if back_button_obj is not None: mouseClick(back_button_obj) utils.waitForGUI(0.5) - test.endSection() +def test_shutdown_behavior(): + shutdown_button = utility.get_object_from_names(names.o_SettingsHome_confirmButton, error_message = "shut-down button object missing") + if shutdown_button is not None: + mouseClick(shutdown_button) + hd_simulator.cmd_send_poweroff_command() + utils.waitForGUI(0.5) + test_user_confirmation_screen(expected_title=config.SERVICES_SHUTDOWN_CONFIRM_TITLE, + expected_message=config.SERVICES_SHUTDOWN_CONFIRM_MSG, + is_test_click_cancel = True) + utils.waitForGUI(0.5) + mouseClick(shutdown_button) + hd_simulator.cmd_send_poweroff_command() + utils.waitForGUI(0.5) + test_user_confirmation_screen(expected_title=config.SERVICES_SHUTDOWN_CONFIRM_TITLE, + expected_message=config.SERVICES_SHUTDOWN_CONFIRM_MSG, + is_test_click_confirm = True) + utils.waitForGUI(1) + hd_simulator.cmd_send_poweroff_timeout() + utils.waitForGUI(2) + hd_simulator.cmd_send_poweroff_imminent() + utils.waitForGUI(6) + def main(): utils.tstStart(__file__) test.log("TODO test case incomplete, need script call handling in the APP to complete", "Need to add an option to the application to allow mocked-script calls") @@ -307,9 +330,11 @@ navigate_to_service_menu() # test the subscreens - test_enable_root_ssh_screen() - test_factory_reset_screen() - test_decommissioning_screen() + # test_enable_root_ssh_screen() + # test_factory_reset_screen() + # test_decommissioning_screen() + test_shutdown_behavior() + utils.tstDone() \ No newline at end of file