From 7b172667cfe321982b7594bc70fe530bf60604a9 Mon Sep 17 00:00:00 2001 From: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> Date: Thu, 6 Jan 2022 13:13:00 -0600 Subject: [PATCH] Adding info lines for debugging File Menu tests and waits during drag and drop operations in Docking test Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> --- .../editor/EditorScripts/Docking_BasicDockedTools.py | 9 ++++++--- .../editor/EditorScripts/Menus_EditMenuOptions.py | 1 + .../editor/EditorScripts/Menus_FileMenuOptions.py | 1 + .../editor/EditorScripts/Menus_ViewMenuOptions.py | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py index d83db7d90c..8734769225 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Docking_BasicDockedTools.py @@ -85,22 +85,25 @@ def Docking_BasicDockedTools(): # We drag/drop it over the viewport since it doesn't allow docking, so this will undock it render_overlay = editor_window.findChild(QtWidgets.QWidget, "renderOverlay") pyside_utils.drag_and_drop(entity_outliner, render_overlay) - + general.idle_wait(0.5) + # We need to grab a new reference to the Entity Outliner QDockWidget because when it gets moved - # to the floating window, its parent changes so the wrapped intance we had becomes invalid + # to the floating window, its parent changes so the wrapped instance we had becomes invalid entity_outliner = editor_window.findChild(QtWidgets.QDockWidget, "Entity Outliner") # Dock the Entity Inspector tabbed with the floating Entity Outliner entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") pyside_utils.drag_and_drop(entity_inspector, entity_outliner) + general.idle_wait(0.5) # We need to grab a new reference to the Entity Inspector QDockWidget because when it gets moved - # to the floating window, its parent changes so the wrapped intance we had becomes invalid + # to the floating window, its parent changes so the wrapped instance we had becomes invalid entity_inspector = editor_window.findChild(QtWidgets.QDockWidget, "Entity Inspector") # Dock the Console tabbed with the floating Entity Inspector console = editor_window.findChild(QtWidgets.QDockWidget, "Console") pyside_utils.drag_and_drop(console, entity_inspector) + general.idle_wait(0.5) # Check to ensure all the tools are parented to the same QStackedWidget def check_all_panes_tabbed(): diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py index 7d72d76776..0536575893 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_EditMenuOptions.py @@ -64,6 +64,7 @@ def Menus_EditMenuOptions_Work(): for option in edit_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "Edit", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py index cade2125e2..a4e702cbd1 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_FileMenuOptions.py @@ -53,6 +53,7 @@ def Menus_FileMenuOptions_Work(): for option in file_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "File", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py index 2d92fdb97c..e2ee3e2a55 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/Menus_ViewMenuOptions.py @@ -52,6 +52,7 @@ def Menus_ViewMenuOptions_Work(): for option in view_menu_options: try: action = pyside_utils.get_action_for_menu_path(editor_window, "View", *option) + Report.info(f"Triggering {action.iconText()}") action.trigger() action_triggered = True except Exception as e: