From 972f4b3c2876b2a039eb735d9d3e971f703854eb Mon Sep 17 00:00:00 2001 From: darapan Date: Thu, 6 May 2021 23:30:54 -0700 Subject: [PATCH] "Following rules in SPEC-6690" --- .../PythonTests/scripting/TestSuite_Active.py | 51 ++++++++++++++++--- .../VariableManager_UnpinVariableType.py | 4 -- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py index 7c218b5fa9..36dd4f21e3 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py @@ -12,9 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import pytest import os import sys + sys.path.append(os.path.dirname(__file__)) import ImportPathHelper as imports + imports.init() import hydra_test_utils as hydra @@ -26,22 +28,25 @@ TEST_DIRECTORY = os.path.dirname(__file__) @pytest.mark.SUITE_periodic -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +@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") @@ -49,9 +54,11 @@ class TestAutomation(TestAutomationBase): def test_ScriptCanvas_TwoComponents(self, request, workspace, editor, launcher_platform, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoComponents as test_module + self._run_test(request, workspace, editor, test_module) @pytest.mark.test_case_id("T92562986") @@ -59,35 +66,44 @@ class TestAutomation(TestAutomationBase): def test_ScriptCanvas_ChangingAssets(self, request, workspace, editor, launcher_platform, project, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) 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 test_OnEntityActivatedDeactivated_PrintMessage( + self, request, workspace, editor, launcher_platform, project, level + ): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) 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") @@ -95,9 +111,11 @@ class TestAutomation(TestAutomationBase): def test_ScriptCanvas_TwoEntities(self, request, workspace, editor, launcher_platform, project, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoEntities as test_module + self._run_test(request, workspace, editor, test_module) @pytest.mark.test_case_id("T92569013") @@ -106,26 +124,31 @@ class TestAutomation(TestAutomationBase): file_system.delete( [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) + request.addfinalizer(teardown) file_system.delete( [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) 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") @@ -133,19 +156,23 @@ class TestAutomation(TestAutomationBase): def test_Debugging_TargetMultipleEntities(self, request, workspace, editor, launcher_platform, project, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) 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") @@ -153,24 +180,31 @@ class TestAutomation(TestAutomationBase): def test_Entity_AddScriptCanvasComponent(self, request, workspace, editor, launcher_platform, project, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) 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 test_ScriptEvents_SendReceiveAcrossMultiple( + self, request, workspace, editor, launcher_platform, project, level + ): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_SendReceiveAcrossMultiple as test_module + self._run_test(request, workspace, editor, test_module) @pytest.mark.test_case_id("T92567320") @@ -178,16 +212,19 @@ class TestAutomation(TestAutomationBase): def test_ScriptEvents_SendReceiveSuccessfully(self, request, workspace, editor, launcher_platform, project, level): def teardown(): file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_SendReceiveSuccessfully as test_module + self._run_test(request, workspace, editor, test_module) - @pytest.mark.test_case_id("T92568973") def test_VariableManager_UnpinVariableType(self, request, workspace, editor, launcher_platform): from . import VariableManager_UnpinVariableType as test_module + self._run_test(request, workspace, editor, test_module) + # NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method # fails because of pyside_utils import @pytest.mark.SUITE_periodic @@ -256,4 +293,4 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, - ) \ No newline at end of file + ) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType.py index f9fe45dd86..5d097de2f8 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType.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: T92568973 -Test Case Title: Unpin Variable types in Variable Manager -URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568973 """