diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index 31afab87ed..2423bd5b06 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -68,7 +68,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) TEST_SUITE periodic TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR}/scripting/TestSuite_Active.py - TIMEOUT 3000 + TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor AZ::AssetProcessor diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py index dcbbf47f0c..72144ebc0e 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92569013 -Test Case Title: Script Event file can be created -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569013 """ @@ -118,7 +114,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(CreateScriptEventFile) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py index 1f801d4eeb..acc0880a73 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py @@ -7,12 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92568942 -Test Case Title: Clicking the "+" button and selecting "New Script Event" opens the -Asset Editor with a new Script Event asset -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568942 """ from PySide2 import QtWidgets @@ -36,11 +30,10 @@ GENERAL_WAIT = 0.5 # seconds class TestAssetEditor_NewScriptEvent: """ Summary: - Clicking the "+" button in Node Palette and creating New Script Event opens Asset Editor + Verifying logic flow of the "+" button on the Script Canvas pane's Node Palette is as expected Expected Behavior: - Clicking the "+" button and selecting "New Script Event" opens the Asset Editor with a - new Script Event asset + Clicking the "+" button and selecting "New Script Event" opens the Asset Editor with a new Script Event asset Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py index a26cb4f923..71e24139f4 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py @@ -7,11 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92568856 -Test Case Title: Multiple Entities can be targeted in the Debugger tool -URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568856 """ @@ -32,14 +27,14 @@ def Debugging_TargetMultipleEntities(): Multiple Entities can be targeted in the Debugger tool Expected Behavior: - Selected files can be checked for logging. + Multiple selected files can be checked for logging. Upon checking, checkboxes of the parent folders change to either full or partial check. Test Steps: 1) Create temp level 2) Create two entities with scriptcanvas components 3) Set values for scriptcanvas - 4) Open Script Canvas window and get sc opbject + 4) Open Script Canvas window and get sc object 5) Open Debugging(Logging) window 6) Click on Entities tab in logging window 7) Verify if the scriptcanvas exist under entities @@ -54,7 +49,6 @@ def Debugging_TargetMultipleEntities(): :return: None """ - from PySide2 import QtWidgets from PySide2.QtCore import Qt import azlmbr.legacy.general as general diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py index 4aa5c822a7..342f8f3cd4 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py @@ -7,17 +7,12 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92569137 -Test Case Title: Multiple Graphs can be targeted in the Debugger tool -URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569137 """ # fmt: off class Tests(): - select_multiple_targets = ("Multiple targets are selected", "Multiple targets are not selected") + select_multiple_targets = ("Multiple targets are selected", "Multiple targets are not selected") # fmt: on @@ -30,7 +25,7 @@ def Debugging_TargetMultipleGraphs(): Multiple Graphs can be targeted in the Debugger tool Expected Behavior: - Selected files can be checked for logging. + Multiple elected files can be checked for logging. Upon checking, checkboxes of the parent folders change to either full or partial check. Test Steps: @@ -50,7 +45,6 @@ def Debugging_TargetMultipleGraphs(): :return: None """ - from PySide2 import QtWidgets from PySide2.QtCore import Qt import azlmbr.legacy.general as general @@ -107,7 +101,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(Debugging_TargetMultipleGraphs) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py index 4fa1e1257f..da9dc125bc 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py @@ -7,25 +7,21 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C1702824 -Test Case Title: Docking -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702824 """ # fmt: off class Tests(): - pane_opened = ("Pane is opened successfully", "Failed to open pane") - dock_pane = ("Pane is docked successfully", "Failed to dock Pane into one or more allowed area") + pane_opened = ("Pane is opened successfully", "Failed to open pane") + dock_pane = ("Pane is docked successfully", "Failed to dock Pane into one or more allowed area") # fmt: on def Docking_Pane(): """ Summary: - The Script Canvas window is opened to verify if Script canvas panes can be docked into - every possible area of Script Canvas main window. + The Script Canvas window is opened to verify if Script canvas panes can be docked into every + possible area of Script Canvas main window. (top, bottom, right and left sides of the window) Expected Behavior: The pane docks successfully. @@ -44,12 +40,6 @@ def Docking_Pane(): :return: None """ - - # Helper imports - import ImportPathHelper as imports - - imports.init() - from editor_python_test_tools.utils import Report from editor_python_test_tools.utils import TestHelper as helper import editor_python_test_tools.pyside_utils as pyside_utils @@ -111,7 +101,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from editor_python_test_tools.utils import Report Report.start_test(Docking_Pane) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py index a87d9e9be9..246a8894ba 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py @@ -7,14 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92569049 -Test Case Title: Edit > Undo undoes the last action -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569049 -Test case ID: T92569051 -Test Case Title: Edit > Redo redoes the last undone action -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569051 """ @@ -35,8 +27,8 @@ def EditMenu_UndoRedo(): redo it and verify if the variable is created again. Expected Behavior: - The last action is undone. - The last undone action is redone. + The last action is undone upon selecting Undo. + The last undone action is redone upon selecting Redo. Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) @@ -46,7 +38,7 @@ def EditMenu_UndoRedo(): 5) Create new variable 6) Verify if the variable is created initially 7) Trigger Undo action and verify if variable is removed in Variable Manager - 8) Trigger Redo action and verify if variable is readded in Variable Manager + 8) Trigger Redo action and verify if variable is re-added in Variable Manager 9) Close SC window Note: @@ -56,13 +48,12 @@ def EditMenu_UndoRedo(): :return: None """ - from PySide2 import QtWidgets, QtCore - import azlmbr.legacy.general as general - import pyside_utils + import azlmbr.legacy.general as general + # 1) Open Script Canvas window general.idle_enable(True) general.open_pane("Script Canvas") @@ -117,7 +108,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(EditMenu_UndoRedo) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py index fd8e9b1173..4e8576d892 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92562978 -Test Case Title: Script Canvas Component can be added to an entity -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562978 """ @@ -27,10 +23,10 @@ class Tests(): def Entity_AddScriptCanvasComponent(): """ Summary: - verify if Script Canvas component can be added to Entity without any issue + Script Canvas Component can be added to an entity Expected Behavior: - Script Canvas Component is added to the entity successfully without issue. + Script Canvas Component is added to the entity successfully without issue Test Steps: 1) Create temp level @@ -47,7 +43,6 @@ def Entity_AddScriptCanvasComponent(): :return: None """ - from utils import TestHelper as helper from utils import Tracer from editor_entity_utils import EditorEntity diff --git a/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py index f72ac8ea01..094598e51d 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py @@ -7,24 +7,15 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92569037 -Test Case Title: File > New Script creates a new script -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569037 -Test case ID: T92569039 -Test Case Title: File > Open opens the Open... dialog -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569039 """ - -import os -import sys from PySide2 import QtWidgets -import azlmbr.legacy.general as general import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_test_tools.utils import Report +import azlmbr.legacy.general as general + + # fmt: off class Tests(): new_action = "File->New action working as expected" @@ -38,7 +29,8 @@ GENERAL_WAIT = 0.5 # seconds class TestFileMenuNewOpen: """ Summary: - When clicked on File->New, new script opens and File->Open should open the FileBrowser + When clicked on File->New, new script opens + File->Open should open the FileBrowser Expected Behavior: New and Open actions should work as expected. diff --git a/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py index ce610b159b..b2a4b22056 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py @@ -7,26 +7,17 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92563070 -Test Case Title: Graphs can be closed by clicking X on the Graph name tab -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563070 -Test case ID: T92563068 -Test Case Title: Save Prompt: User is prompted to save a graph on close after -creating a new graph -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563068 """ -import os -import sys from PySide2 import QtWidgets -import azlmbr.legacy.general as general import editor_python_test_tools.pyside_utils as pyside_utils from editor_python_test_tools.utils import TestHelper as helper from editor_python_test_tools.utils import Report +import azlmbr.legacy.general as general + + # fmt: off class Tests(): new_graph = "New graph created" @@ -45,7 +36,8 @@ class TestGraphCloseSavePrompt: Save Prompt is opened before closing. Expected Behavior: - New and Open actions should work as expected. + The Graph is closed. + Upon closing the graph, User is prompted whether or not to save changes. Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py index a93b6e61d1..754a0ae686 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py @@ -7,14 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92569079 -Test Case Title: View > Zoom In zooms the graph in -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569079 -Test case ID: T92569081 -Test Case Title: View > Zoom In zooms the graph out -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569081 """ @@ -93,7 +85,7 @@ def Graph_ZoomInZoomOut(): zin = pyside_utils.find_child_by_pattern(sc_main, {"objectName": "action_ZoomIn", "type": QtWidgets.QAction}) zin.trigger() result = helper.wait_for_condition( - lambda: curr_m11 < graphics_view.transform().m11() and curr_m22 < graphics_view.transform().m22(), GENERAL_WAIT, + lambda: curr_m11 < graphics_view.transform().m11() and curr_m22 < graphics_view.transform().m22(), GENERAL_WAIT ) Report.result(Tests.zoom_in, result) @@ -102,7 +94,7 @@ def Graph_ZoomInZoomOut(): zout = pyside_utils.find_child_by_pattern(sc_main, {"objectName": "action_ZoomOut", "type": QtWidgets.QAction}) zout.trigger() result = helper.wait_for_condition( - lambda: curr_m11 > graphics_view.transform().m11() and curr_m22 > graphics_view.transform().m22(), GENERAL_WAIT, + lambda: curr_m11 > graphics_view.transform().m11() and curr_m22 > graphics_view.transform().m22(), GENERAL_WAIT ) Report.result(Tests.zoom_out, result) @@ -114,7 +106,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(Graph_ZoomInZoomOut) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py index a45024cebf..ef794433f0 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py @@ -9,9 +9,10 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ + def init(): import os import sys - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools') - \ No newline at end of file + + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../automatedtesting_shared") + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../EditorPythonTestTools/editor_python_test_tools") diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py index 33d3f4137a..7351e45212 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92568982 -Test Case Title: Renaming variables in the Node Inspector -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568982 """ @@ -51,16 +47,16 @@ def NodeInspector_RenameVariable(): :return: None """ - - TEST_NAME = "test name" - from PySide2 import QtWidgets, QtCore, QtTest from PySide2.QtCore import Qt - import azlmbr.legacy.general as general import pyside_utils from utils import TestHelper as helper + import azlmbr.legacy.general as general + + TEST_NAME = "test name" + def open_tool(sc, dock_widget_name, pane_name): if sc.findChild(QtWidgets.QDockWidget, dock_widget_name) is None: action = pyside_utils.find_child_by_pattern(sc, {"text": pane_name, "type": QtWidgets.QAction}) @@ -121,12 +117,10 @@ def NodeInspector_RenameVariable(): general.close_pane("Script Canvas") - if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(NodeInspector_RenameVariable) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py index de30e46767..87a08346d0 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92562993 -Test Case Title: Clicking the X button on the Search Box clears the currently entered string -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562993 """ @@ -24,11 +20,11 @@ class Tests(): def NodePalette_ClearSelection(): """ Summary: - We enter some string in the Node Palette Search box, and click on the X button to verify if the - search string got cleared. + Clicking the X button on the Search Box clears the currently entered string Expected Behavior: - Clicking the X button on the Search Box clears the currently entered string + After entering a string value into the Node Palette's search box and click on + the X button, the search box should be cleared Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) @@ -45,15 +41,13 @@ def NodePalette_ClearSelection(): :return: None """ - from PySide2 import QtWidgets + import pyside_utils from utils import TestHelper as helper import azlmbr.legacy.general as general - import pyside_utils - TEST_STRING = "Test String" # 1) Open Script Canvas window (Tools > Script Canvas) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py index 2ab76071a6..dfe1064a92 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py @@ -7,18 +7,13 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - - -Test case ID: T92568940 -Test Case Title: Categories and Nodes can be selected -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568940 """ # fmt: off class Tests(): - category_selected = ("Category can be selected", "Category cannot be selected") - node_selected = ("Node can be selected", "Node cannot be selected") + category_selected = ("Category can be selected", "Category cannot be selected") + node_selected = ("Node can be selected", "Node cannot be selected") # fmt: on @@ -31,7 +26,8 @@ def NodePalette_SelectNode(): Categories and Nodes can be selected Expected Behavior: - When clicked on Node Palette, nodes and categories can be selected. + A category can be selected inside the Node Palette + A Node can be selected inside the Node Palette Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) @@ -54,11 +50,12 @@ def NodePalette_SelectNode(): NODE = "Find Path To Entity" from PySide2 import QtWidgets - import azlmbr.legacy.general as general import pyside_utils from utils import TestHelper as helper + import azlmbr.legacy.general as general + # 1) Open Script Canvas window (Tools > Script Canvas) general.idle_enable(True) general.open_pane("Script Canvas") @@ -98,7 +95,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(NodePalette_SelectNode) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py index 51b63c4268..c331157e82 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py @@ -7,30 +7,26 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92569253 // T92569254 -Test Case Title: On Entity Activated // On Entity Deactivated -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569253 // https://testrail.agscollab.com/index.php?/tests/view/92569254 """ # fmt: off class Tests(): - level_created = ("Successfully created temp level", "Failed to create temp level") - controller_exists = ("Successfully found controller entity", "Failed to find controller entity") - activated_exists = ("Successfully found activated entity", "Failed to find activated entity") - deactivated_exists = ("Successfully found deactivated entity","Failed to find deactivated entity") - start_states_correct = ("Start states set up successfully", "Start states set up incorrectly") - game_mode_entered = ("Successfully entered game mode" "Failed to enter game mode") - lines_found = ("Successfully found expected prints", "Failed to find expected prints") - game_mode_exited = ("Successfully exited game mode" "Failed to exit game mode") + level_created = ("Successfully created temp level", "Failed to create temp level") + controller_exists = ("Successfully found controller entity", "Failed to find controller entity") + activated_exists = ("Successfully found activated entity", "Failed to find activated entity") + deactivated_exists = ("Successfully found deactivated entity", "Failed to find deactivated entity") + start_states_correct = ("Start states set up successfully", "Start states set up incorrectly") + game_mode_entered = ("Successfully entered game mode" "Failed to enter game mode") + lines_found = ("Successfully found expected prints", "Failed to find expected prints") + game_mode_exited = ("Successfully exited game mode" "Failed to exit game mode") # fmt: on def OnEntityActivatedDeactivated_PrintMessage(): """ Summary: - Verify that the On Entity Activation node is working as expected + Verify that the On Entity Activated/On Entity Deactivated nodes are working as expected Expected Behavior: Upon entering game mode, the Controller entity will wait 1 second and then activate the ActivationTest @@ -55,9 +51,9 @@ def OnEntityActivatedDeactivated_PrintMessage(): """ import os - from utils import TestHelper as helper from editor_entity_utils import EditorEntity as Entity from utils import Report + from utils import TestHelper as helper from utils import Tracer import azlmbr.legacy.general as general @@ -69,33 +65,45 @@ def OnEntityActivatedDeactivated_PrintMessage(): controller_dict = { "name": "Controller", "status": "active", - "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "controller.scriptcanvas") + "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "controller.scriptcanvas"), } activated_dict = { "name": "ActivationTest", "status": "inactive", - "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "activator.scriptcanvas") + "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "activator.scriptcanvas"), } deactivated_dict = { "name": "DeactivationTest", "status": "active", - "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "deactivator.scriptcanvas") + "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "deactivator.scriptcanvas"), } def get_asset(asset_path): - return azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False) + return azlmbr.asset.AssetCatalogRequestBus( + azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False + ) def setup_level(): - def create_editor_entity(entity_dict:dict, entity_to_activate:EditorEntity=None, entity_to_deactivate:EditorEntity=None) -> EditorEntity: + def create_editor_entity( + entity_dict: dict, entity_to_activate: EditorEntity = None, entity_to_deactivate: EditorEntity = None + ) -> EditorEntity: entity = Entity.create_editor_entity(entity_dict["name"]) entity.set_start_status(entity_dict["status"]) sc_component = entity.add_component("Script Canvas") - sc_component.set_component_property_value("Script Canvas Asset|Script Canvas Asset", get_asset(entity_dict["path"])) + sc_component.set_component_property_value( + "Script Canvas Asset|Script Canvas Asset", get_asset(entity_dict["path"]) + ) if entity_dict["name"] == "Controller": sc_component.get_property_tree() - sc_component.set_component_property_value("Properties|Variable Fields|Variables|[0]|Name,Value|Datum|Datum|EntityToActivate", entity_to_activate.id) - sc_component.set_component_property_value("Properties|Variable Fields|Variables|[1]|Name,Value|Datum|Datum|EntityToDeactivate", entity_to_deactivate.id) + sc_component.set_component_property_value( + "Properties|Variable Fields|Variables|[0]|Name,Value|Datum|Datum|EntityToActivate", + entity_to_activate.id, + ) + sc_component.set_component_property_value( + "Properties|Variable Fields|Variables|[1]|Name,Value|Datum|Datum|EntityToDeactivate", + entity_to_deactivate.id, + ) return entity activated = create_editor_entity(activated_dict) @@ -111,7 +119,7 @@ def OnEntityActivatedDeactivated_PrintMessage(): Report.critical_result(test_tuple, entity.id.IsValid()) return entity - def validate_start_state(entity:EditorEntity, expected_state:str): + def validate_start_state(entity: EditorEntity, expected_state: str): """ Validate that the starting state of the entity is correct, if it isn't then attempt to rectify and recheck. :return: bool: Whether state is set as expected @@ -177,8 +185,8 @@ def OnEntityActivatedDeactivated_PrintMessage(): if __name__ == "__main__": import ImportPathHelper as imports - imports.init() + imports.init() from utils import Report - + Report.start_test(OnEntityActivatedDeactivated_PrintMessage) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py index 666f052240..a72a302760 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py @@ -7,11 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C1702834 // C1702823 -Test Case Title: Opening pane // Closing pane -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702834 and - https://testrail.agscollab.com/index.php?/cases/view/1702823 """ @@ -26,10 +21,10 @@ class Tests(): def Opening_Closing_Pane(): """ Summary: - The Script Canvas window is opened to verify if Script canvas panes can be opened and closed. + The Script Canvas window is opened to verify if Script Canvas panes can be opened and closed. Expected Behavior: - The pane opens and closes successfully. + The panes open and close successfully. Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) @@ -115,7 +110,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from editor_python_test_tools.utils import Report Report.start_test(Opening_Closing_Pane) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py index fa5e9e6068..746efa500c 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py @@ -7,24 +7,19 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C1702821 // C1702832 -Test Case Title: Retain visibility, size and location upon Script Canvas restart -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702821 and - https://testrail.agscollab.com/index.php?/cases/view/1702832 """ # fmt: off class Tests(): - relaunch_sc = ("Script Canvas window is relaunched", "Failed to relaunch Script Canvas window") - test_panes_visible = ("All the test panes are opened", "Failed to open one or more test panes") - close_pane_1 = ("Test pane 1 is closed", "Failed to close test pane 1") - visiblity_retained = ("Test pane retained its visiblity on SC restart", "Failed to retain visiblity of test pane on SC restart") - resize_pane_3 = ("Test pane 3 resized successfully", "Failed to resize Test pane 3") - size_retained = ("Test pane retained its size on SC restart", "Failed to retain size of test pane on SC restart") - location_changed = ("Location of test pane 2 changed successfully", "Failed to change locatio of test pane 2") - location_retained = ("Test pane retained its location on SC restart", "Failed to retain location of test pane on SC restart") + relaunch_sc = ("Script Canvas window is relaunched", "Failed to relaunch Script Canvas window") + test_panes_visible = ("All the test panes are opened", "Failed to open one or more test panes") + close_pane_1 = ("Test pane 1 is closed", "Failed to close test pane 1") + visibility_retained = ("Test pane retained its visibility on SC restart", "Failed to retain visibility of test pane on SC restart") + resize_pane_3 = ("Test pane 3 resized successfully", "Failed to resize Test pane 3") + size_retained = ("Test pane retained its size on SC restart", "Failed to retain size of test pane on SC restart") + location_changed = ("Location of test pane 2 changed successfully", "Failed to change location of test pane 2") + location_retained = ("Test pane retained its location on SC restart", "Failed to retain location of test pane on SC restart") # fmt: on @@ -35,7 +30,7 @@ def Pane_RetainOnSCRestart(): upon ScriptCanvas restart. Expected Behavior: - The ScriptCanvas pane retain it's visiblity, size and location upon ScriptCanvas restart. + The ScriptCanvas pane retain it's visibility, size and location upon ScriptCanvas restart. Test Steps: 1) Open Script Canvas window (Tools > Script Canvas) @@ -44,7 +39,7 @@ def Pane_RetainOnSCRestart(): 4) Change dock location of test pane 2 5) Resize test pane 3 6) Relaunch Script Canvas - 7) Verify if test pane 1 retain its visiblity + 7) Verify if test pane 1 retain its visibility 8) Verify if location of test pane 2 is retained 9) Verify if size of test pane 3 is retained 10) Restore default layout and close SC window @@ -57,6 +52,10 @@ def Pane_RetainOnSCRestart(): :return: None """ + # Pyside imports + from PySide2 import QtCore, QtWidgets + from PySide2.QtCore import Qt + # Helper imports from utils import Report from utils import TestHelper as helper @@ -65,11 +64,6 @@ def Pane_RetainOnSCRestart(): # Open 3D Engine Imports import azlmbr.legacy.general as general - # Pyside imports - from PySide2 import QtCore, QtWidgets - from PySide2.QtCore import Qt - - # Constants TEST_PANE_1 = "NodePalette" # test visibility TEST_PANE_2 = "VariableManager" # test location TEST_PANE_3 = "NodeInspector" # test size @@ -130,10 +124,10 @@ def Pane_RetainOnSCRestart(): sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0) Report.result(Tests.relaunch_sc, sc_visible) - # 7) Verify if test pane 1 retain its visiblity + # 7) Verify if test pane 1 retain its visibility editor_window = pyside_utils.get_editor_main_window() sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas") - Report.result(Tests.visiblity_retained, not find_pane(sc, TEST_PANE_1).isVisible()) + Report.result(Tests.visibility_retained, not find_pane(sc, TEST_PANE_1).isVisible()) # 8) Verify if location of test pane 2 is retained sc_main = sc.findChild(QtWidgets.QMainWindow) @@ -158,7 +152,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(Pane_RetainOnSCRestart) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py index 180f577953..a870bea86f 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C1702829 -Test Case Title: Resizing pane -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702829 """ @@ -24,7 +20,7 @@ class Tests(): def Resizing_Pane(): """ Summary: - The Script Canvas window is opened to verify if Script canvas panes can be resized and scaled + The Script Canvas window is opened to verify if Script Canvas panes can be resized and scaled Expected Behavior: The pane is resized and scaled appropriately. @@ -33,7 +29,7 @@ def Resizing_Pane(): 1) Open Script Canvas window (Tools > Script Canvas) 2) Restore default layout 3) Make sure pane is opened - 4) Resize pane + 4) Resize pane and verify change 5) Restore default layout 6) Close Script Canvas window @@ -45,6 +41,8 @@ def Resizing_Pane(): :return: None """ + from PySide2 import QtWidgets + from editor_python_test_tools.utils import Report from editor_python_test_tools.utils import TestHelper as helper import editor_python_test_tools.pyside_utils as pyside_utils @@ -52,9 +50,6 @@ def Resizing_Pane(): # Open 3D Engine imports import azlmbr.legacy.general as general - # Pyside imports - from PySide2 import QtWidgets - PANE_WIDGET = "NodePalette" SCALE_INT = 10 @@ -87,7 +82,7 @@ def Resizing_Pane(): Report.result(Tests.open_pane, pane.isVisible()) - # 4) Resize pane + # 4) Resize pane and verify change initial_size = pane.frameSize() pane.resize(initial_size.width() + SCALE_INT, initial_size.height() + SCALE_INT) new_size = pane.frameSize() diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py index 38d60ad871..a1e177f5ec 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py @@ -7,11 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92562986 -Test Case Title: Changing the assigned Script Canvas Asset on an entity properly updates -level functionality -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562986 """ @@ -58,7 +53,6 @@ def ScriptCanvas_ChangingAssets(): import azlmbr.math as math import azlmbr.asset as asset import azlmbr.bus as bus - import azlmbr.paths as paths LEVEL_NAME = "tmp_level" ASSET_1 = os.path.join("scriptcanvas", "ScriptCanvas_TwoComponents0.scriptcanvas") @@ -84,7 +78,6 @@ def ScriptCanvas_ChangingAssets(): Report.result(Tests.found_lines, find_expected_line(EXP_LINE)) helper.exit_game_mode(Tests.game_mode_exited) - # 1) Create temp level general.idle_enable(True) result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py index 896bee96e5..5117069b64 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92563190 -Test Case Title: A single Entity with two Script Canvas components works properly -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563190 """ @@ -58,6 +54,7 @@ def ScriptCanvas_TwoComponents(): import hydra_editor_utils as hydra from utils import Report from utils import Tracer + import azlmbr.legacy.general as general import azlmbr.math as math import azlmbr.asset as asset @@ -112,7 +109,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(ScriptCanvas_TwoComponents) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py index 401e6c0271..53b3951c1a 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py @@ -7,16 +7,12 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92563191 -Test Case Title: Two Entities can use the same Graph asset successfully at RunTime -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563191 """ # fmt: off class Tests(): - level_created = ("New level created", "New level not created") + level_created = ("New level created successfully", "New level failed to create") game_mode_entered = ("Game Mode successfully entered", "Game mode failed to enter") game_mode_exited = ("Game Mode successfully exited", "Game mode failed to exited") found_lines = ("Expected log lines were found", "Expected log lines were not found") @@ -27,7 +23,7 @@ def ScriptCanvas_TwoEntities(): """ Summary: Two Entities can use the same Graph asset successfully at RunTime. The script canvas asset - attached to the enties will print the respective entity names. + attached to the entities will print the respective entity names. Expected Behavior: When game mode is entered, respective strings of different entities should be printed. @@ -49,9 +45,10 @@ def ScriptCanvas_TwoEntities(): import os + import hydra_editor_utils as hydra from utils import TestHelper as helper from utils import Tracer - import hydra_editor_utils as hydra + import azlmbr.legacy.general as general import azlmbr.math as math import azlmbr.asset as asset diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py index d671229cdf..f58d6007a1 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92567321 -Test Case Title: Script Events: Can send and receive a script event across multiple entities successfully -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567321 """ @@ -28,7 +24,8 @@ class Tests(): def ScriptEvents_SendReceiveAcrossMultiple(): """ Summary: - EntityA and EntityB will be created in a level. Attached to both will be a Script Canvas component. The Script Event created for the test will be sent from EntityA to EntityB. + EntityA and EntityB will be created in a level. Attached to both will be a Script Canvas component. + The Script Event created for the test will be sent from EntityA to EntityB. Expected Behavior: The output of the Script Event should be printed to the console @@ -50,7 +47,7 @@ def ScriptEvents_SendReceiveAcrossMultiple(): :return: None """ import os - + from editor_entity_utils import EditorEntity as Entity from utils import Report from utils import TestHelper as helper @@ -66,20 +63,19 @@ def ScriptEvents_SendReceiveAcrossMultiple(): "assetA": os.path.join("ScriptCanvas", f"{ASSET_PREFIX}A.scriptcanvas"), "assetB": os.path.join("ScriptCanvas", f"{ASSET_PREFIX}B.scriptcanvas"), } - sc_for_entities = { - "EntityA": asset_paths["assetA"], - "EntityB": asset_paths["assetB"] - } + sc_for_entities = {"EntityA": asset_paths["assetA"], "EntityB": asset_paths["assetB"]} EXPECTED_LINES = ["Incoming Message Received"] def get_asset(asset_path): - return azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False) + return azlmbr.asset.AssetCatalogRequestBus( + azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False + ) def create_editor_entity(name, sc_asset): entity = Entity.create_editor_entity(name) sc_comp = entity.add_component("Script Canvas") sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", get_asset(sc_asset)) - Report.critical_result(Tests.__dict__[name.lower()+"_created"], entity.id.isValid()) + Report.critical_result(Tests.__dict__[name.lower() + "_created"], entity.id.isValid()) def locate_expected_lines(line_list: list): found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints] @@ -113,8 +109,8 @@ def ScriptEvents_SendReceiveAcrossMultiple(): if __name__ == "__main__": import ImportPathHelper as imports - imports.init() + imports.init() from utils import Report Report.start_test(ScriptEvents_SendReceiveAcrossMultiple) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py index b5e26d14ae..3f343221b0 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py @@ -7,10 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92567320 -Test Case Title: Script Events: Can send and receive a script event successfully -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567320 """ @@ -104,7 +100,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(ScriptEvents_SendReceiveSuccessfully) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py index d87f2986bf..24e8eeda11 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py @@ -29,22 +29,18 @@ TEST_DIRECTORY = os.path.dirname(__file__) @pytest.mark.parametrize("launcher_platform", ['windows_editor']) @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(TestAutomationBase): - @pytest.mark.test_case_id("C1702834", "C1702823") def test_Opening_Closing_Pane(self, request, workspace, editor, launcher_platform): from . import Opening_Closing_Pane as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("C1702824") def test_Docking_Pane(self, request, workspace, editor, launcher_platform): from . import Docking_Pane as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("C1702829") def test_Resizing_Pane(self, request, workspace, editor, launcher_platform): from . import Resizing_Pane as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92563190") @pytest.mark.parametrize("level", ["tmp_level"]) def test_ScriptCanvas_TwoComponents(self, request, workspace, editor, launcher_platform, level): def teardown(): @@ -54,7 +50,6 @@ class TestAutomation(TestAutomationBase): from . import ScriptCanvas_TwoComponents as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92562986") @pytest.mark.parametrize("level", ["tmp_level"]) def test_ScriptCanvas_ChangingAssets(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -64,18 +59,14 @@ class TestAutomation(TestAutomationBase): from . import ScriptCanvas_ChangingAssets as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569079", "T92569081") def test_Graph_ZoomInZoomOut(self, request, workspace, editor, launcher_platform): from . import Graph_ZoomInZoomOut as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92568940") def test_NodePalette_SelectNode(self, request, workspace, editor, launcher_platform): from . import NodePalette_SelectNode as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569253") - @pytest.mark.test_case_id("T92569254") @pytest.mark.parametrize("level", ["tmp_level"]) def test_OnEntityActivatedDeactivated_PrintMessage(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -85,12 +76,10 @@ class TestAutomation(TestAutomationBase): from . import OnEntityActivatedDeactivated_PrintMessage as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92562993") def test_NodePalette_ClearSelection(self, request, workspace, editor, launcher_platform, project): from . import NodePalette_ClearSelection as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92563191") @pytest.mark.parametrize("level", ["tmp_level"]) def test_ScriptCanvas_TwoEntities(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -100,7 +89,6 @@ class TestAutomation(TestAutomationBase): from . import ScriptCanvas_TwoEntities as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569013") def test_AssetEditor_CreateScriptEventFile(self, request, workspace, editor, launcher_platform, project): def teardown(): file_system.delete( @@ -113,22 +101,18 @@ class TestAutomation(TestAutomationBase): from . import AssetEditor_CreateScriptEventFile as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569165", "T92569167", "T92569168", "T92569170") def test_Toggle_ScriptCanvasTools(self, request, workspace, editor, launcher_platform): from . import Toggle_ScriptCanvasTools as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92568982") def test_NodeInspector_RenameVariable(self, request, workspace, editor, launcher_platform, project): from . import NodeInspector_RenameVariable as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569137") def test_Debugging_TargetMultipleGraphs(self, request, workspace, editor, launcher_platform, project): from . import Debugging_TargetMultipleGraphs as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92568856") @pytest.mark.parametrize("level", ["tmp_level"]) def test_Debugging_TargetMultipleEntities(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -138,17 +122,14 @@ class TestAutomation(TestAutomationBase): from . import Debugging_TargetMultipleEntities as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92569049", "T92569051") def test_EditMenu_UndoRedo(self, request, workspace, editor, launcher_platform, project): from . import EditMenu_UndoRedo as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("C1702825", "C1702831") def test_UnDockedPane_CloseSCWindow(self, request, workspace, editor, launcher_platform): from . import UnDockedPane_CloseSCWindow as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92562978") @pytest.mark.parametrize("level", ["tmp_level"]) def test_Entity_AddScriptCanvasComponent(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -158,12 +139,10 @@ class TestAutomation(TestAutomationBase): from . import Entity_AddScriptCanvasComponent as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("C1702821", "C1702832") def test_Pane_RetainOnSCRestart(self, request, workspace, editor, launcher_platform): from . import Pane_RetainOnSCRestart as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92567321") @pytest.mark.parametrize("level", ["tmp_level"]) def test_ScriptEvents_SendReceiveAcrossMultiple(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -173,7 +152,6 @@ class TestAutomation(TestAutomationBase): from . import ScriptEvents_SendReceiveAcrossMultiple as test_module self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92567320") @pytest.mark.parametrize("level", ["tmp_level"]) def test_ScriptEvents_SendReceiveSuccessfully(self, request, workspace, editor, launcher_platform, project, level): def teardown(): @@ -193,7 +171,6 @@ class TestScriptCanvasTests(object): The following tests use hydra_test_utils.py to launch the editor and validate the results. """ - @pytest.mark.test_case_id("T92569037", "T92569039") def test_FileMenu_New_Open(self, request, editor, launcher_platform): expected_lines = [ "File->New action working as expected: True", @@ -203,7 +180,6 @@ class TestScriptCanvasTests(object): request, TEST_DIRECTORY, editor, "FileMenu_New_Open.py", expected_lines, auto_test_mode=False, timeout=60, ) - @pytest.mark.test_case_id("T92568942") def test_AssetEditor_NewScriptEvent(self, request, editor, launcher_platform): expected_lines = [ "New Script event action found: True", @@ -221,7 +197,6 @@ class TestScriptCanvasTests(object): timeout=60, ) - @pytest.mark.test_case_id("T92563068", "T92563070") def test_GraphClose_SavePrompt(self, request, editor, launcher_platform): expected_lines = [ "New graph created: True", @@ -238,7 +213,6 @@ class TestScriptCanvasTests(object): timeout=60, ) - @pytest.mark.test_case_id("T92564789", "T92568873") def test_VariableManager_CreateDeleteVars(self, request, editor, launcher_platform): var_types = ["Boolean", "Color", "EntityID", "Number", "String", "Transform", "Vector2", "Vector3", "Vector4"] expected_lines = [f"Success: {var_type} variable is created" for var_type in var_types] diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py index 4024e28277..2b935a74b3 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py @@ -7,17 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C92569165, C92569167, C92569168, C92569170 -Test Case Title: Tools > Node Palette toggles the Node Palette - Tools > Node Inspector toggles the Node Inspector - Tools > Bookmarks toggles the Bookmarks - Tools > Variable Manager toggles the Variable Manager - -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/92569165 - https://testrail.agscollab.com/index.php?/cases/view/92569167 - https://testrail.agscollab.com/index.php?/cases/view/92569168 - https://testrail.agscollab.com/index.php?/cases/view/92569170 """ @@ -63,6 +52,8 @@ def Toggle_ScriptCanvasTools(): :return: None """ + from PySide2 import QtWidgets + from utils import Report from utils import TestHelper as helper import pyside_utils @@ -70,9 +61,6 @@ def Toggle_ScriptCanvasTools(): # Open 3D Engine imports import azlmbr.legacy.general as general - # Pyside imports - from PySide2 import QtWidgets - def click_menu_option(window, option_text): action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction}) action.trigger() @@ -131,7 +119,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(Toggle_ScriptCanvasTools) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py index 875f28ec95..fbdba8fb38 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py @@ -7,11 +7,6 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: C1702825 // C1702831 -Test Case Title: Undocking // Closing script canvas with the pane floating -URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702825 & - https://testrail.agscollab.com/index.php?/cases/view/1702831 """ @@ -47,6 +42,8 @@ def UnDockedPane_CloseSCWindow(): :return: None """ + from PySide2 import QtWidgets + # Helper imports from utils import Report from utils import TestHelper as helper @@ -55,9 +52,6 @@ def UnDockedPane_CloseSCWindow(): # Open 3D Engine imports import azlmbr.legacy.general as general - # Pyside imports - from PySide2 import QtWidgets - TEST_PANE = "NodePalette" # Chosen most commonly used pane def click_menu_option(window, option_text): @@ -122,7 +116,6 @@ if __name__ == "__main__": import ImportPathHelper as imports imports.init() - from utils import Report Report.start_test(UnDockedPane_CloseSCWindow) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py index 6facc324d4..8f7557c01e 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py @@ -7,20 +7,13 @@ distribution (the "License"). All use of this software is governed by the Licens or, if provided, by the license below or the license accompanying this file. Do not remove or modify any license notices. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -Test case ID: T92564789 -Test Case Title: Each Variable type can be created -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92564789 -Test case ID: T92568873 -Test Case Title: Each Variable type can be deleted -URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568873 """ def VariableManager_CreateDeleteVars(): """ Summary: - Each variable type can be created and deleted in variable manager. + Creating and deleting each type of variable in the Variable Manager pane Expected Behavior: Each variable type can be created and deleted in variable manager. @@ -43,15 +36,13 @@ def VariableManager_CreateDeleteVars(): """ from PySide2 import QtWidgets, QtCore, QtTest - from PySide2.QtCore import Qt from utils import TestHelper as helper + import pyside_utils import azlmbr.legacy.general as general - import pyside_utils - def generate_test_tuple(var_type, action): return (f"{var_type} variable is {action}d", f"{var_type} variable is not {action}d")