Renaming test files for standardization and setting optimized tests to run alongside existing
Signed-off-by: jckand-amzn <jckand@amazon.com>
This commit is contained in:
+7
-1
@@ -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
|
||||
@@ -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)
|
||||
-84
@@ -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)
|
||||
-173
@@ -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
|
||||
)
|
||||
-92
@@ -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)
|
||||
@@ -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)
|
||||
-167
@@ -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)
|
||||
-22
@@ -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
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user