From c30642d855d63e60f25f879d48362ad9a2aaaf2b Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Wed, 25 Aug 2021 16:13:10 -0500 Subject: [PATCH] Renaming test files for standardization and setting optimized tests to run alongside existing Signed-off-by: jckand-amzn --- .../PythonTests/largeworlds/CMakeLists.txt | 34 +++- ...gnal_Periodic.py => TestSuite_Periodic.py} | 0 ...zed.py => TestSuite_Periodic_Optimized.py} | 0 .../test_GradientIncompatibilities.py | 103 ----------- .../test_GradientPreviewSettings.py | 118 ------------ .../gradient_signal/test_GradientSampling.py | 86 --------- .../test_GradientSurfaceTagEmitter.py | 116 ------------ .../gradient_signal/test_GradientTransform.py | 157 ---------------- .../gradient_signal/test_ImageGradient.py | 69 ------- ...dscapeCanvas_Main.py => TestSuite_Main.py} | 0 ...timized.py => TestSuite_Main_Optimized.py} | 8 +- ...nvas_Periodic.py => TestSuite_Periodic.py} | 0 .../landscape_canvas/test_AreaNodes.py | 125 ------------- .../test_EditFunctionality.py | 84 --------- .../test_GeneralGraphFunctionality.py | 173 ------------------ .../test_GradientModifierNodes.py | 92 ---------- .../landscape_canvas/test_GradientNodes.py | 109 ----------- .../test_GraphComponentSync.py | 167 ----------------- .../test_LandscapeCanvas_Main_Optimized.py | 22 --- .../landscape_canvas/test_ShapeNodes.py | 82 --------- 20 files changed, 38 insertions(+), 1507 deletions(-) rename AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/{test_GradientSignal_Periodic.py => TestSuite_Periodic.py} (100%) rename AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/{test_GradientSignal_Periodic_Optimized.py => TestSuite_Periodic_Optimized.py} (100%) delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientIncompatibilities.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientPreviewSettings.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSampling.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSurfaceTagEmitter.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientTransform.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py rename AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/{test_LandscapeCanvas_Main.py => TestSuite_Main.py} (100%) rename AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/{test_LandscapeCanvas_Periodic_Optimized.py => TestSuite_Main_Optimized.py} (92%) rename AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/{test_LandscapeCanvas_Periodic.py => TestSuite_Periodic.py} (100%) delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_AreaNodes.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_EditFunctionality.py delete mode 100644 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientNodes.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py delete mode 100644 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main_Optimized.py delete mode 100755 AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_ShapeNodes.py diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt index f133780fbc..b3030e84ac 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt @@ -124,13 +124,14 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ COMPONENT LargeWorlds ) + ## LandscapeCanvas ## ly_add_pytest( NAME AutomatedTesting::LandscapeCanvasTests_Main TEST_SERIAL TEST_SUITE main - PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas/test_LandscapeCanvas_Main.py + PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas/TestSuite_Main.py RUNTIME_DEPENDENCIES AZ::AssetProcessor Legacy::Editor @@ -143,7 +144,20 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ NAME AutomatedTesting::LandscapeCanvasTests_Periodic TEST_SERIAL TEST_SUITE periodic - PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas/test_LandscapeCanvas_Periodic.py + PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas/TestSuite_Periodic.py + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + Legacy::Editor + AutomatedTesting.Assets + COMPONENT + LargeWorlds + ) + + ly_add_pytest( + NAME AutomatedTesting::LandscapeCanvasTests_Main_Optimized + TEST_SERIAL + TEST_SUITE main + PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas/TestSuite_Main_Optimized.py RUNTIME_DEPENDENCIES AZ::AssetProcessor Legacy::Editor @@ -153,11 +167,25 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ ) ## GradientSignal ## + ly_add_pytest( NAME AutomatedTesting::GradientSignalTests_Periodic TEST_SERIAL TEST_SUITE periodic - PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal/test_GradientSignal_Periodic.py + PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal/TestSuite_Periodic.py + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + Legacy::Editor + AutomatedTesting.Assets + COMPONENT + LargeWorlds + ) + + ly_add_pytest( + NAME AutomatedTesting::GradientSignalTests_Periodic_Optimized + TEST_SERIAL + TEST_SUITE periodic + PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal/TestSuite_Periodic_Optimized.py RUNTIME_DEPENDENCIES AZ::AssetProcessor Legacy::Editor diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSignal_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSignal_Periodic.py rename to AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSignal_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSignal_Periodic_Optimized.py rename to AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientIncompatibilities.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientIncompatibilities.py deleted file mode 100755 index ec9fb7cb0b..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientIncompatibilities.py +++ /dev/null @@ -1,103 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - - -""" -Tests that the Gradient Generator components are incompatible with Vegetation Area components -""" - -import os -import pytest -pytest.importorskip('ly_test_tools') - -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - -gradient_generators = [ - 'Altitude Gradient', - 'Constant Gradient', - 'FastNoise Gradient', - 'Image Gradient', - 'Perlin Noise Gradient', - 'Random Noise Gradient', - 'Shape Falloff Gradient', - 'Slope Gradient', - 'Surface Mask Gradient' -] - -gradient_modifiers = [ - 'Dither Gradient Modifier', - 'Gradient Mixer', - 'Invert Gradient Modifier', - 'Levels Gradient Modifier', - 'Posterize Gradient Modifier', - 'Smooth-Step Gradient Modifier', - 'Threshold Gradient Modifier' -] - -vegetation_areas = [ - 'Vegetation Layer Spawner', - 'Vegetation Layer Blender', - 'Vegetation Layer Blocker', - 'Vegetation Layer Blocker (Mesh)' -] - -all_gradients = gradient_modifiers + gradient_generators - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientIncompatibilities(object): - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - request.addfinalizer(teardown) - - @pytest.mark.test_case_id('C2691648', 'C2691649', 'C2691650', 'C2691651', - 'C2691653', 'C2691656', 'C2691657', 'C2691658', - 'C2691647', 'C2691655') - @pytest.mark.SUITE_periodic - def test_GradientGenerators_Incompatibilities(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [] - for gradient_generator in gradient_generators: - for vegetation_area in vegetation_areas: - expected_lines.append(f"{gradient_generator} is disabled before removing {vegetation_area} component") - expected_lines.append(f"{gradient_generator} is enabled after removing {vegetation_area} component") - expected_lines.append("GradientGeneratorIncompatibilities: result=SUCCESS") - hydra.launch_and_validate_results(request, test_directory, editor, - 'GradientGenerators_Incompatibilities.py', - expected_lines=expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C3416464', 'C3416546', 'C3961318', 'C3961319', - 'C3961323', 'C3961324', 'C3980656', 'C3980657', - 'C3980661', 'C3980662', 'C3980666', 'C3980667', - 'C2691652') - @pytest.mark.SUITE_periodic - def test_GradientModifiers_Incompatibilities(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [] - for gradient_modifier in gradient_modifiers: - for vegetation_area in vegetation_areas: - expected_lines.append(f"{gradient_modifier} is disabled before removing {vegetation_area} component") - expected_lines.append(f"{gradient_modifier} is enabled after removing {vegetation_area} component") - - for conflicting_gradient in all_gradients: - expected_lines.append(f"{gradient_modifier} is disabled before removing {conflicting_gradient} component") - expected_lines.append(f"{gradient_modifier} is enabled after removing {conflicting_gradient} component") - expected_lines.append("GradientModifiersIncompatibilities: result=SUCCESS") - hydra.launch_and_validate_results(request, test_directory, editor, - 'GradientModifiers_Incompatibilities.py', - expected_lines=expected_lines, cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientPreviewSettings.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientPreviewSettings.py deleted file mode 100755 index f41dd605e6..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientPreviewSettings.py +++ /dev/null @@ -1,118 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientPreviewSettings(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C3980668', 'C2676825', 'C2676828', 'C2676822', 'C3416547', 'C3961320', 'C3961325', - 'C3980658', 'C3980663') - @pytest.mark.SUITE_periodic - def test_GradientPreviewSettings_DefaultPinnedEntityIsSelf(self, request, editor, level, launcher_platform): - - expected_lines = [ - "Perlin Noise Gradient has Preview pinned to own Entity result: SUCCESS", - "Random Noise Gradient has Preview pinned to own Entity result: SUCCESS", - "FastNoise Gradient has Preview pinned to own Entity result: SUCCESS", - "Dither Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "Invert Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "Levels Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "Posterize Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "Smooth-Step Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "Threshold Gradient Modifier has Preview pinned to own Entity result: SUCCESS", - "GradientPreviewSettings_DefaultPinnedEntity: result=SUCCESS" - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientPreviewSettings_DefaultPinnedEntityIsSelf.py", - expected_lines, - cfg_args=[level] - ) - - @pytest.mark.test_case_id("C2676829", "C3961326", "C3980659", "C3980664", "C3980669", "C3416548", "C2676823", - "C3961321", "C2676826") - @pytest.mark.SUITE_periodic - def test_GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin(self, request, editor, level, - launcher_platform): - - expected_lines = [ - "Random Noise Gradient entity Created", - "Entity has a Random Noise Gradient component", - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "Random Noise Gradient Preview Settings|Pin Preview to Shape: SUCCESS", - "Random Noise Gradient --- Preview Position set to world origin", - "Random Noise Gradient --- Preview Size set to (1, 1, 1)", - "Levels Gradient Modifier entity Created", - "Entity has a Levels Gradient Modifier component", - "Levels Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Levels Gradient Modifier --- Preview Position set to world origin", - "Posterize Gradient Modifier entity Created", - "Entity has a Posterize Gradient Modifier component", - "Posterize Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Posterize Gradient Modifier --- Preview Position set to world origin", - "Smooth-Step Gradient Modifier entity Created", - "Entity has a Smooth-Step Gradient Modifier component", - "Smooth-Step Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Smooth-Step Gradient Modifier --- Preview Position set to world origin", - "Threshold Gradient Modifier entity Created", - "Entity has a Threshold Gradient Modifier component", - "Threshold Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Threshold Gradient Modifier --- Preview Position set to world origin", - "FastNoise Gradient entity Created", - "Entity has a FastNoise Gradient component", - "FastNoise Gradient Preview Settings|Pin Preview to Shape: SUCCESS", - "FastNoise Gradient --- Preview Position set to world origin", - "FastNoise Gradient --- Preview Size set to (1, 1, 1)", - "Dither Gradient Modifier entity Created", - "Entity has a Dither Gradient Modifier component", - "Dither Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Dither Gradient Modifier --- Preview Position set to world origin", - "Dither Gradient Modifier --- Preview Size set to (1, 1, 1)", - "Invert Gradient Modifier entity Created", - "Entity has a Invert Gradient Modifier component", - "Invert Gradient Modifier Preview Settings|Pin Preview to Shape: SUCCESS", - "Invert Gradient Modifier --- Preview Position set to world origin", - "Perlin Noise Gradient entity Created", - "Entity has a Perlin Noise Gradient component", - "Perlin Noise Gradient Preview Settings|Pin Preview to Shape: SUCCESS", - "Perlin Noise Gradient --- Preview Position set to world origin", - "Perlin Noise Gradient --- Preview Size set to (1, 1, 1)", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin.py", - expected_lines, - cfg_args=[level] - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSampling.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSampling.py deleted file mode 100755 index 099a9404e1..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSampling.py +++ /dev/null @@ -1,86 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest -import logging - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip("ly_test_tools") -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -logger = logging.getLogger(__name__) -test_directory = os.path.join(os.path.dirname(__file__), "EditorScripts") - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientSampling(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id("C3526311") - @pytest.mark.SUITE_periodic - def test_GradientSampling_GradientReferencesAddRemoveSuccessfully(self, request, editor, level, launcher_platform): - - expected_lines = [ - "Entity has a Random Noise Gradient component", - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "Entity has a Dither Gradient Modifier component", - "Gradient Generator is pinned to the Dither Gradient Modifier successfully", - "Gradient Generator is cleared from the Dither Gradient Modifier successfully", - "Entity has a Invert Gradient Modifier component", - "Gradient Generator is pinned to the Invert Gradient Modifier successfully", - "Gradient Generator is cleared from the Invert Gradient Modifier successfully", - "Entity has a Levels Gradient Modifier component", - "Gradient Generator is pinned to the Levels Gradient Modifier successfully", - "Gradient Generator is cleared from the Levels Gradient Modifier successfully", - "Entity has a Posterize Gradient Modifier component", - "Gradient Generator is pinned to the Posterize Gradient Modifier successfully", - "Gradient Generator is cleared from the Posterize Gradient Modifier successfully", - "Entity has a Smooth-Step Gradient Modifier component", - "Gradient Generator is pinned to the Smooth-Step Gradient Modifier successfully", - "Gradient Generator is cleared from the Smooth-Step Gradient Modifier successfully", - "Entity has a Threshold Gradient Modifier component", - "Gradient Generator is pinned to the Threshold Gradient Modifier successfully", - "Gradient Generator is cleared from the Threshold Gradient Modifier successfully", - ] - - unexpected_lines = [ - "Failed to pin Gradient Generator to the Dither Gradient Modifier", - "Failed to clear Gradient Generator from the Dither Gradient Modifier", - "Failed to pin Gradient Generator to the Invert Gradient Modifier", - "Failed to clear Gradient Generator from the Invert Gradient Modifier", - "Failed to pin Gradient Generator to the Levels Gradient Modifier", - "Failed to clear Gradient Generator from the Levels Gradient Modifier", - "Failed to pin Gradient Generator to the Posterize Gradient Modifier", - "Failed to clear Gradient Generator from the Posterize Gradient Modifier", - "Failed to pin Gradient Generator to the Smooth-Step Gradient Modifier", - "Failed to clear Gradient Generator from the Smooth-Step Gradient Modifier", - "Failed to pin Gradient Generator to the Threshold Gradient Modifier", - "Failed to clear Gradient Generator from the Threshold Gradient Modifier", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientSampling_GradientReferencesAddRemoveSuccessfully.py", - expected_lines, - unexpected_lines, - cfg_args=[level] - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSurfaceTagEmitter.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSurfaceTagEmitter.py deleted file mode 100755 index 6d4a832875..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientSurfaceTagEmitter.py +++ /dev/null @@ -1,116 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest -import logging - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip("ly_test_tools") -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -logger = logging.getLogger(__name__) -test_directory = os.path.join(os.path.dirname(__file__), "EditorScripts") - - -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("level", ["tmp_level"]) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientSurfaceTagEmitter(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - # Cleanup temp level before and after test runs - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id("C3297302") - @pytest.mark.SUITE_periodic - def test_GradientSurfaceTagEmitter_ComponentDependencies(self, request, editor, level, workspace, - launcher_platform): - cfg_args = [level] - - expected_lines = [ - "GradientSurfaceTagEmitter_ComponentDependencies: test started", - "GradientSurfaceTagEmitter_ComponentDependencies: Gradient Surface Tag Emitter is Disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Dither Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Gradient Mixer and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Invert Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Levels Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Posterize Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Smooth-Step Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Threshold Gradient Modifier and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Altitude Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Constant Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: FastNoise Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Image Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Perlin Noise Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Random Noise Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Reference Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Shape Falloff Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Slope Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Surface Mask Gradient and Gradient Surface Tag Emitter are enabled", - "GradientSurfaceTagEmitter_ComponentDependencies: result=SUCCESS", - ] - - unexpected_lines = [ - "GradientSurfaceTagEmitter_ComponentDependencies: Gradient Surface Tag Emitter is Enabled, but should be Disabled without dependencies met", - "GradientSurfaceTagEmitter_ComponentDependencies: Dither Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Gradient Mixer and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Invert Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Levels Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Posterize Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Smooth-Step Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Threshold Gradient Modifier and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Altitude Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Constant Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: FastNoise Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Image Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Perlin Noise Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Random Noise Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Reference Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Shape Falloff Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Slope Gradient and Gradient Surface Tag Emitter are disabled", - "GradientSurfaceTagEmitter_ComponentDependencies: Surface Mask Gradient and Gradient Surface Tag Emitter are disabled", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientSurfaceTagEmitter_ComponentDependencies.py", - expected_lines=expected_lines, - unexpected_lines=unexpected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C3297303") - @pytest.mark.SUITE_periodic - def test_GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, editor, level, - launcher_platform): - - expected_lines = [ - "Entity has a Gradient Surface Tag Emitter component", - "Entity has a Reference Gradient component", - "Added SurfaceTag: container count is 1", - "Removed SurfaceTag: container count is 0", - "GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSucessfully: result=SUCCESS" - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully.py", - expected_lines, - cfg_args=[level] - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientTransform.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientTransform.py deleted file mode 100755 index 447a548abb..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_GradientTransform.py +++ /dev/null @@ -1,157 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - - -""" -Tests that the Gradient Transform Modifier component isn't enabled unless it has a component on -the same Entity that provides the ShapeService (e.g. box shape, or reference shape) -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientTransformRequiresShape(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - request.addfinalizer(teardown) - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C3430289') - @pytest.mark.SUITE_periodic - def test_GradientTransform_RequiresShape(self, request, editor, level, launcher_platform): - - expected_lines = [ - "Gradient Transform Modifier component was added to entity, but the component is disabled", - "Gradient Transform component is not active without a Shape component on the Entity", - "Box Shape component was added to entity", - "Gradient Transform Modifier component is active now that the Entity has a Shape", - "GradientTransformRequiresShape: result=SUCCESS" - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientTransform_RequiresShape.py", - expected_lines, - cfg_args=[level] - ) - - @pytest.mark.test_case_id("C3430292") - @pytest.mark.SUITE_periodic - def test_GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange(self, request, editor, level, launcher_platform): - - expected_lines = [ - "Entity Created", - "Entity has a Random Noise Gradient component", - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "Components added to the entity", - "entity Configuration|Frequency Zoom: SUCCESS", - "Frequency Zoom is equal to expected value", - ] - - unexpected_lines = ["Frequency Zoom is not equal to expected value"] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange.py", - expected_lines, - unexpected_lines=unexpected_lines, - cfg_args=[level] - ) - - @pytest.mark.test_case_id("C3430297") - @pytest.mark.SUITE_periodic - def test_GradientTransform_ComponentIncompatibleWithSpawners(self, request, editor, launcher_platform, level): - # C3430297: Component cannot be active on the same Entity as an active Vegetation Layer Spawner - expected_lines = [ - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "New Entity Created", - "Gradient Transform Modifier is Enabled", - "Box Shape is Enabled", - "Entity has a Vegetation Layer Spawner component", - "Vegetation Layer Spawner is incompatible and disabled", - "GradientTransform_ComponentIncompatibleWithSpawners: result=SUCCESS" - ] - - unexpected_lines = [ - "Gradient Transform Modifier is Disabled. But It should be Enabled in an Entity", - "Box Shape is Disabled. But It should be Enabled in an Entity", - "Vegetation Layer Spawner is compatible and enabled. But It should be Incompatible and disabled", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientTransform_ComponentIncompatibleWithSpawners.py", - expected_lines, - unexpected_lines, - cfg_args=[level] - ) - - @pytest.mark.test_case_id("C4753767") - @pytest.mark.SUITE_periodic - def test_GradientTransform_ComponentIncompatibleWithExpectedGradients(self, request, editor, launcher_platform, level): - expected_lines = [ - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "New Entity Created", - "Gradient Transform Modifier is Enabled", - "Box Shape is Enabled", - "Entity has a Constant Gradient component", - "Entity has a Altitude Gradient component", - "Entity has a Gradient Mixer component", - "Entity has a Reference Gradient component", - "Entity has a Shape Falloff Gradient component", - "Entity has a Slope Gradient component", - "Entity has a Surface Mask Gradient component", - "All newly added components are incompatible and disabled", - "GradientTransform_ComponentIncompatibleWithExpectedGradients: result=SUCCESS" - ] - - unexpected_lines = [ - "Gradient Transform Modifier is disabled, but it should be enabled", - "Box Shape is disabled, but it should be enabled", - "Constant Gradient is enabled, but should be disabled", - "Altitude Gradient is enabled, but should be disabled", - "Gradient Mixer is enabled, but should be disabled", - "Reference Gradient is enabled, but should be disabled", - "Shape Falloff Gradient is enabled, but should be disabled", - "Slope Gradient is enabled, but should be disabled", - "Surface Mask Gradient component is enabled, but should be disabled", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GradientTransform_ComponentIncompatibleWithExpectedGradients.py", - expected_lines, - unexpected_lines, - cfg_args=[level] - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py deleted file mode 100755 index c4280678ee..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/test_ImageGradient.py +++ /dev/null @@ -1,69 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestImageGradientRequiresShape(object): - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - request.addfinalizer(teardown) - - @pytest.mark.test_case_id('C2707570') - @pytest.mark.SUITE_periodic - def test_ImageGradient_RequiresShape(self, request, editor, level, launcher_platform): - cfg_args = [level] - expected_lines = [ - "Image Gradient component was added to entity, but the component is disabled", - "Gradient Transform Modifier component was added to entity, but the component is disabled", - "Image Gradient component is not active without a Shape component on the Entity", - "Box Shape component was added to entity", - "Image Gradient component is active now that the Entity has a Shape", - "ImageGradientRequiresShape: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'ImageGradient_RequiresShape.py', - expected_lines=expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id("C3829430") - @pytest.mark.SUITE_periodic - def test_ImageGradient_ProcessedImageAssignedSuccessfully(self, request, editor, level, launcher_platform): - - expected_lines = [ - "Image Gradient Entity created", - "Entity has a Image Gradient component", - "Entity has a Gradient Transform Modifier component", - "Entity has a Box Shape component", - "image_grad_test_gsi.png was found in the workspace", - "Entity Configuration|Image Asset: SUCCESS", - "ImageGradient_ProcessedImageAssignedSucessfully: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "ImageGradient_ProcessedImageAssignedSuccessfully.py", - expected_lines, - cfg_args=[level] - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main.py rename to AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py similarity index 92% rename from AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Periodic_Optimized.py rename to AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py index 59e8b1fe90..8c662a9b45 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Periodic_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py @@ -17,6 +17,12 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + class test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(EditorSharedTest): + from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module + + class test_LandscapeCanvas_GradientMixer_NodeConstruction(EditorSharedTest): + from .EditorScripts import GradientMixer_NodeConstruction as test_module + class test_LandscapeCanvas_AreaNodes_DependentComponentsAdded(EditorSharedTest): from .EditorScripts import AreaNodes_DependentComponentsAdded as test_module @@ -86,4 +92,4 @@ class TestAutomation(EditorTestSuite): from .EditorScripts import ShapeNodes_EntityCreatedOnNodeAdd as test_module class test_LandscapeCanvas_ShapeNodes_EntityRemovedOnNodeDelete(EditorSharedTest): - from .EditorScripts import ShapeNodes_EntityRemovedOnNodeDelete as test_module + from .EditorScripts import ShapeNodes_EntityRemovedOnNodeDelete as test_module \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py similarity index 100% rename from AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Periodic.py rename to AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_AreaNodes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_AreaNodes.py deleted file mode 100755 index e5736d9db9..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_AreaNodes.py +++ /dev/null @@ -1,125 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C13815919 - Appropriate component dependencies are automatically added to node entities -C13767844 - All Vegetation Area nodes can be added to a graph -C17605868 - All Vegetation Area nodes can be removed from a graph -C13815873 - All Filters/Modifiers/Selectors can be added to/removed from a Layer node -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestAreaNodes(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C13815919') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_AreaNodes_DependentComponentsAdded(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "SpawnerAreaNode created new Entity with all required components", - "MeshBlockerAreaNode created new Entity with all required components", - "BlockerAreaNode created new Entity with all required components", - "AreaNodeComponentDependency: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'AreaNodes_DependentComponentsAdded.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C13767844') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_AreaNodes_EntityCreatedOnNodeAdd(self, request, editor, level, launcher_platform): - """ - Verifies all Area nodes can be successfully added to a Landscape Canvas graph, and the proper entity - creation occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "AreaBlenderNode created new Entity with Vegetation Layer Blender Component", - "BlockerAreaNode created new Entity with Vegetation Layer Blocker Component", - "MeshBlockerAreaNode created new Entity with Vegetation Layer Blocker (Mesh) Component", - "SpawnerAreaNode created new Entity with Vegetation Layer Spawner Component", - "AreaNodeEntityCreate: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'AreaNodes_EntityCreatedOnNodeAdd.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C17605868') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_AreaNodes_EntityRemovedOnNodeDelete(self, request, editor, level, launcher_platform): - """ - Verifies all Area nodes can be successfully removed from a Landscape Canvas graph, and the proper entity - cleanup occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "AreaBlenderNode corresponding Entity was deleted when node is removed", - "MeshBlockerAreaNode corresponding Entity was deleted when node is removed", - "SpawnerAreaNode corresponding Entity was deleted when node is removed", - "BlockerAreaNode corresponding Entity was deleted when node is removed", - "AreaNodeEntityDelete: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'AreaNodes_EntityRemovedOnNodeDelete.py', expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C13815873') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_LayerExtenderNodes_ComponentEntitySync(self, request, editor, level, launcher_platform): - """ - Verifies all Area Extender nodes can be successfully added to and removed from a Landscape Canvas graph, and the - proper entity creation/cleanup occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "AreaBlenderNode successfully added and removed all filters/modifiers/selectors", - "SpawnerAreaNode successfully added and removed all filters/modifiers/selectors", - "LayerExtenderNodeComponentEntitySync: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'LayerExtenderNodes_ComponentEntitySync.py', expected_lines, - cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_EditFunctionality.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_EditFunctionality.py deleted file mode 100755 index 7ff110d6b0..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_EditFunctionality.py +++ /dev/null @@ -1,84 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C29278563 - Disabled nodes can be successfully duplicated -C30813586 - Editor remains stable after Undoing deletion of a node on a slice entity -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestEditFunctionality(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C29278563') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_DuplicateDisabledNodes(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "SpawnerAreaNode duplicated with disabled component", - "SpawnerAreaNode duplicated with deleted component", - "MeshBlockerAreaNode duplicated with disabled component", - "MeshBlockerAreaNode duplicated with deleted component", - "BlockerAreaNode duplicated with disabled component", - "BlockerAreaNode duplicated with deleted component", - "FastNoiseGradientNode duplicated with disabled component", - "FastNoiseGradientNode duplicated with deleted component", - "ImageGradientNode duplicated with disabled component", - "ImageGradientNode duplicated with deleted component", - "PerlinNoiseGradientNode duplicated with disabled component", - "PerlinNoiseGradientNode duplicated with deleted component", - "RandomNoiseGradientNode duplicated with disabled component", - "RandomNoiseGradientNode duplicated with deleted component", - "DisabledNodeDuplication: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'Edit_DisabledNodeDuplication.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C30813586') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_UndoNodeDelete_SliceEntity(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Vegetation Layer Spawner node found on graph", - "Vegetation Layer Spawner node was removed", - "Editor is still responsive", - "UndoNodeDeleteSlice: result=SUCCESS" - ] - - unexpected_lines = [ - "Vegetation Layer Spawner node not found", - "Vegetation Layer Spawner node was not removed" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'Edit_UndoNodeDelete_SliceEntity.py', - expected_lines, unexpected_lines=unexpected_lines, cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py deleted file mode 100644 index 4ab5a41b85..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py +++ /dev/null @@ -1,173 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C2735988 - Landscape Canvas tool can be opened/closed -C13815862 - New graph can be created -C13767840 - New root entity is created when a new graph is created through Landscape Canvas -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip("ly_test_tools") -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), "EditorScripts") - - -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -@pytest.mark.parametrize("level", ["tmp_level"]) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGeneralGraphFunctionality(object): - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "slices", "TestSlice.slice")], True, True) - - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "slices", "TestSlice.slice")], True, True) - - @pytest.mark.test_case_id("C2735988", "C13815862", "C13767840") - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_NewGraph_CreatedSuccessfully(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "Root entity has Landscape Canvas component", - "Landscape Canvas pane is closed", - "CreateNewGraph: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "CreateNewGraph.py", - expected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C2735990") - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_Component_AddedRemoved(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas Component added to Entity", - "Landscape Canvas Component removed from Entity", - "LandscapeCanvasComponentAddedRemoved: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "LandscapeCanvasComponent_AddedRemoved.py", - expected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C14212352") - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GraphClosed_OnLevelChange(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "Graph is no longer open in Landscape Canvas", - "GraphClosedOnLevelChange: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GraphClosed_OnLevelChange.py", - expected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C17488412") - @pytest.mark.SUITE_periodic - @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2201") - def test_LandscapeCanvas_GraphClosed_OnEntityDelete(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "Graph registered with Landscape Canvas", - "The graph is no longer open after deleting the Entity", - "GraphClosedOnEntityDelete: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GraphClosed_OnEntityDelete.py", - expected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C15167461") - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GraphClosed_TabbedGraphClosesIndependently(self, request, editor, level, - launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "2nd new graph created", - "3rd new graph created", - "Graphs registered with Landscape Canvas", - "Graph 2 was successfully closed", - "GraphClosedTabbedGraph: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "GraphClosed_TabbedGraph.py", - expected_lines, - cfg_args=cfg_args - ) - - @pytest.mark.test_case_id("C22602016") - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_SliceCreateInstantiate(self, request, editor, level, workspace, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "LandscapeCanvas_SliceCreateInstantiate: test started", - "landscape_canvas_entity Entity successfully created", - "LandscapeCanvas_SliceCreateInstantiate: Slice has been created successfully: True", - "LandscapeCanvas_SliceCreateInstantiate: Slice instantiated: True", - "LandscapeCanvas_SliceCreateInstantiate: result=SUCCESS", - ] - - hydra.launch_and_validate_results( - request, - test_directory, - editor, - "LandscapeCanvas_SliceCreateInstantiate.py", - expected_lines=expected_lines, - cfg_args=cfg_args - ) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py deleted file mode 100755 index 99f342a574..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientModifierNodes.py +++ /dev/null @@ -1,92 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C13767841 - All Gradient Modifier nodes can be added to a graph -C18055051 - All Gradient Modifier nodes can be removed from a graph -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientModifierNodes(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C13767841') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GradientModifierNodes_EntityCreatedOnNodeAdd(self, request, editor, level, - launcher_platform): - """ - Verifies all Gradient Modifier nodes can be successfully added to a Landscape Canvas graph, and the proper - entity creation occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "DitherGradientModifierNode created new Entity with Dither Gradient Modifier Component", - "GradientMixerNode created new Entity with Gradient Mixer Component", - "InvertGradientModifierNode created new Entity with Invert Gradient Modifier Component", - "LevelsGradientModifierNode created new Entity with Levels Gradient Modifier Component", - "PosterizeGradientModifierNode created new Entity with Posterize Gradient Modifier Component", - "SmoothStepGradientModifierNode created new Entity with Smooth-Step Gradient Modifier Component", - "ThresholdGradientModifierNode created new Entity with Threshold Gradient Modifier Component", - "GradientModifierNodeEntityCreate: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'GradientModifierNodes_EntityCreatedOnNodeAdd.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C18055051') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GradientModifierNodes_EntityRemovedOnNodeDelete(self, request, editor, level, - launcher_platform): - """ - Verifies all Gradient Modifier nodes can be successfully removed from a Landscape Canvas graph, and the proper - entity cleanup occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "DitherGradientModifierNode corresponding Entity was deleted when node is removed", - "GradientMixerNode corresponding Entity was deleted when node is removed", - "InvertGradientModifierNode corresponding Entity was deleted when node is removed", - "LevelsGradientModifierNode corresponding Entity was deleted when node is removed", - "PosterizeGradientModifierNode corresponding Entity was deleted when node is removed", - "SmoothStepGradientModifierNode corresponding Entity was deleted when node is removed", - "ThresholdGradientModifierNode corresponding Entity was deleted when node is removed", - "GradientModifierNodeEntityDelete: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'GradientModifierNodes_EntityRemovedOnNodeDelete.py', - expected_lines, cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientNodes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientNodes.py deleted file mode 100755 index 1fdb254e98..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GradientNodes.py +++ /dev/null @@ -1,109 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C13815920 - Appropriate component dependencies are automatically added to node entities -C13767842 - All Gradient nodes can be added to a graph -C17461363 - All Gradient nodes can be removed from a graph -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGradientNodes(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C13815920') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GradientNodes_DependentComponentsAdded(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "FastNoiseGradientNode created new Entity with all required components", - "ImageGradientNode created new Entity with all required components", - "PerlinNoiseGradientNode created new Entity with all required components", - "RandomNoiseGradientNode created new Entity with all required components" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'GradientNodes_DependentComponentsAdded.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C13767842') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GradientNodes_EntityCreatedOnNodeAdd(self, request, editor, level, launcher_platform): - """ - Verifies all Gradient nodes can be successfully added to a Landscape Canvas graph, and the proper entity - creation occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "AltitudeGradientNode created new Entity with Altitude Gradient Component", - "ConstantGradientNode created new Entity with Constant Gradient Component", - "FastNoiseGradientNode created new Entity with FastNoise Gradient Component", - "ImageGradientNode created new Entity with Image Gradient Component", - "PerlinNoiseGradientNode created new Entity with Perlin Noise Gradient Component", - "RandomNoiseGradientNode created new Entity with Random Noise Gradient Component", - "ShapeAreaFalloffGradientNode created new Entity with Shape Falloff Gradient Component", - "SlopeGradientNode created new Entity with Slope Gradient Component", - "SurfaceMaskGradientNode created new Entity with Surface Mask Gradient Component" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'GradientNodes_EntityCreatedOnNodeAdd.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C17461363') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GradientNodes_EntityRemovedOnNodeDelete(self, request, editor, level, launcher_platform): - """ - Verifies all Gradient nodes can be successfully removed from a Landscape Canvas graph, and the proper entity - cleanup occurs. - """ - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "FastNoiseGradientNode corresponding Entity was deleted when node is removed", - "AltitudeGradientNode corresponding Entity was deleted when node is removed", - "ConstantGradientNode corresponding Entity was deleted when node is removed", - "RandomNoiseGradientNode corresponding Entity was deleted when node is removed", - "ShapeAreaFalloffGradientNode corresponding Entity was deleted when node is removed", - "SlopeGradientNode corresponding Entity was deleted when node is removed", - "PerlinNoiseGradientNode corresponding Entity was deleted when node is removed", - "ImageGradientNode corresponding Entity was deleted when node is removed", - "SurfaceMaskGradientNode corresponding Entity was deleted when node is removed" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'GradientNodes_EntityRemovedOnNodeDelete.py', - expected_lines, cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py deleted file mode 100755 index 71389dcf5b..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GraphComponentSync.py +++ /dev/null @@ -1,167 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C4705586 - Altering connections on graph nodes appropriately updates component properties -C22715182 - Components are updated when nodes are added/removed/updated -C22602072 - Graph is updated when underlying components are added/removed -C15987206 - Gradient Mixer Layers are properly setup when constructing in a graph -C21333743 - Vegetation Layer Blenders are properly setup when constructing in a graph -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import ly_test_tools._internal.pytest_plugin as internal_plugin -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestGraphComponentSync(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C4705586') - @pytest.mark.BAT - @pytest.mark.SUITE_main - def test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(self, request, editor, level, launcher_platform): - - # Skip test if running against Debug build - if "debug" in internal_plugin.build_directory: - pytest.skip("Does not execute against debug builds.") - - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "Random Noise Gradient component Preview Entity property set to Box Shape EntityId", - "Dither Gradient Modifier component Inbound Gradient property set to Random Noise Gradient EntityId", - "Gradient Mixer component Inbound Gradient extendable property set to Dither Gradient Modifier EntityId", - "SlotConnectionsUpdateComponents: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, - 'SlotConnections_UpdateComponentReferences.py', expected_lines, - cfg_args=cfg_args) - - @pytest.mark.test_case_id('C22715182') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_GraphUpdates_UpdateComponents(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - 'Rotation Modifier component was removed from entity', - 'BushSpawner entity was deleted', - 'Gradient Entity Id reference was properly updated', - 'GraphUpdatesUpdateComponents: result=SUCCESS' - ] - - unexpected_lines = [ - 'Rotation Modifier component is still present on entity', - 'Failed to delete BushSpawner entity', - 'Gradient Entity Id was not updated properly' - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'GraphUpdates_UpdateComponents.py', - expected_lines, unexpected_lines=unexpected_lines, - cfg_args=cfg_args) - - @pytest.mark.test_case_id('C22602072') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_ComponentUpdates_UpdateGraph(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "LandscapeCanvas entity found", - "BushSpawner entity found", - "Vegetation Distribution Filter on BushSpawner entity found", - "Graph opened", - "Distribution Filter node found on graph", - "Vegetation Altitude Filter on BushSpawner entity found", - "Altitude Filter node found on graph", - "Vegetation Distribution Filter removed from BushSpawner entity", - "Distribution Filter node was removed from the graph", - "New entity successfully added as a child of the BushSpawner entity", - "Box Shape on Box entity found", - "Box Shape node found on graph", - 'ComponentUpdatesUpdateGraph: result=SUCCESS' - ] - - unexpected_lines = [ - "Distribution Filter node not found on graph", - "Distribution Filter node is still present on the graph", - "Altitude Filter node not found on graph", - "New entity added with an unexpected parent", - "Box Shape node not found on graph" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'ComponentUpdates_UpdateGraph.py', - expected_lines, unexpected_lines=unexpected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C15987206') - @pytest.mark.SUITE_main - def test_LandscapeCanvas_GradientMixer_NodeConstruction(self, request, editor, level, launcher_platform): - """ - Verifies a Gradient Mixer can be setup in Landscape Canvas and all references are property set. - """ - - # Skip test if running against Debug build - if "debug" in internal_plugin.build_directory: - pytest.skip("Does not execute against debug builds.") - - cfg_args = [level] - - expected_lines = [ - 'Landscape Canvas pane is open', - 'New graph created', - 'Graph registered with Landscape Canvas', - 'Perlin Noise Gradient component Preview Entity property set to Box Shape EntityId', - 'Gradient Mixer component Inbound Gradient extendable property set to Perlin Noise Gradient EntityId', - 'Gradient Mixer component Inbound Gradient extendable property set to FastNoise Gradient EntityId', - 'Configuration|Layers|[0]|Operation set to 0', - 'Configuration|Layers|[1]|Operation set to 6', - 'GradientMixerNodeConstruction: result=SUCCESS' - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'GradientMixer_NodeConstruction.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C21333743') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_LayerBlender_NodeConstruction(self, request, editor, level, launcher_platform): - """ - Verifies a Layer Blender can be setup in Landscape Canvas and all references are property set. - """ - cfg_args = [level] - - expected_lines = [ - 'Landscape Canvas pane is open', - 'New graph created', - 'Graph registered with Landscape Canvas', - 'Vegetation Layer Blender component Vegetation Areas[0] property set to Vegetation Layer Spawner EntityId', - 'Vegetation Layer Blender component Vegetation Areas[1] property set to Vegetation Layer Blocker EntityId', - 'LayerBlenderNodeConstruction: result=SUCCESS' - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'LayerBlender_NodeConstruction.py', - expected_lines, cfg_args=cfg_args) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main_Optimized.py deleted file mode 100644 index 68bac24452..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_LandscapeCanvas_Main_Optimized.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -import pytest - -from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite - - -@pytest.mark.SUITE_periodic -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -@pytest.mark.parametrize("project", ["AutomatedTesting"]) -class TestAutomation(EditorTestSuite): - - class test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(EditorSharedTest): - from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module - - class test_LandscapeCanvas_GradientMixer_NodeConstruction(EditorSharedTest): - from .EditorScripts import GradientMixer_NodeConstruction as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_ShapeNodes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_ShapeNodes.py deleted file mode 100755 index 8356d5a404..0000000000 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_ShapeNodes.py +++ /dev/null @@ -1,82 +0,0 @@ -""" -Copyright (c) Contributors to the Open 3D Engine Project. -For complete copyright and license terms please see the LICENSE at the root of this distribution. - -SPDX-License-Identifier: Apache-2.0 OR MIT -""" - -""" -C13767843 - All Shape nodes can be added to a graph -C17412059 - All Shape nodes can be removed from a graph -""" - -import os -import pytest - -# Bail on the test if ly_test_tools doesn't exist. -pytest.importorskip('ly_test_tools') -import ly_test_tools.environment.file_system as file_system -import editor_python_test_tools.hydra_test_utils as hydra - -test_directory = os.path.join(os.path.dirname(__file__), 'EditorScripts') - - -@pytest.mark.parametrize('project', ['AutomatedTesting']) -@pytest.mark.parametrize('level', ['tmp_level']) -@pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.parametrize("launcher_platform", ['windows_editor']) -class TestShapeNodes(object): - - @pytest.fixture(autouse=True) - def setup_teardown(self, request, workspace, project, level): - def teardown(): - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - request.addfinalizer(teardown) - - file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - - @pytest.mark.test_case_id('C13767843') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_ShapeNodes_EntityCreatedOnNodeAdd(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "BoxShapeNode created new Entity with Box Shape Component", - "CapsuleShapeNode created new Entity with Capsule Shape Component", - "CompoundShapeNode created new Entity with Compound Shape Component", - "CylinderShapeNode created new Entity with Cylinder Shape Component", - "PolygonPrismShapeNode created new Entity with Polygon Prism Shape Component", - "SphereShapeNode created new Entity with Sphere Shape Component", - "TubeShapeNode created new Entity with Tube Shape Component", - "DiskShapeNode created new Entity with Disk Shape Component", - "ShapeNodeEntityCreate: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'ShapeNodes_EntityCreatedOnNodeAdd.py', - expected_lines, cfg_args=cfg_args) - - @pytest.mark.test_case_id('C17412059') - @pytest.mark.SUITE_periodic - def test_LandscapeCanvas_ShapeNodes_EntityRemovedOnNodeDelete(self, request, editor, level, launcher_platform): - cfg_args = [level] - - expected_lines = [ - "Landscape Canvas pane is open", - "New graph created", - "Graph registered with Landscape Canvas", - "BoxShapeNode corresponding Entity was deleted when node is removed", - "CapsuleShapeNode corresponding Entity was deleted when node is removed", - "CompoundShapeNode corresponding Entity was deleted when node is removed", - "CylinderShapeNode corresponding Entity was deleted when node is removed", - "PolygonPrismShapeNode corresponding Entity was deleted when node is removed", - "SphereShapeNode corresponding Entity was deleted when node is removed", - "TubeShapeNode corresponding Entity was deleted when node is removed", - "DiskShapeNode corresponding Entity was deleted when node is removed", - "ShapeNodeEntityDelete: result=SUCCESS" - ] - - hydra.launch_and_validate_results(request, test_directory, editor, 'ShapeNodes_EntityRemovedOnNodeDelete.py', - expected_lines, cfg_args=cfg_args)