Merge branch 'main' into smoke_migration_branch

This commit is contained in:
darapan
2021-05-11 01:50:59 -07:00
846 changed files with 16477 additions and 67597 deletions
+15 -14
View File
@@ -107,20 +107,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
endif()
## NvCloth ##
# [TODO LYN-1928] Enable when AutomatedTesting runs with Atom
#if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
# ly_add_pytest(
# NAME AutomatedTesting::NvClothTests
# TEST_SUITE main
# TEST_SERIAL
# PATH ${CMAKE_CURRENT_LIST_DIR}/NvCloth/TestSuite_Active.py
# TIMEOUT 1500
# RUNTIME_DEPENDENCIES
# Legacy::Editor
# AZ::AssetProcessor
# AutomatedTesting.Assets
# )
#endif()
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_pytest(
NAME AutomatedTesting::NvClothTests_Main
TEST_SUITE main
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/NvCloth/TestSuite_Active.py
TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
AutomatedTesting.Assets
COMPONENT
NvCloth
)
endif()
## Editor Python Bindings ##
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977329
# Test Case Title : Add cloth simulation to a Mesh
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977329
# fmt: off
class Tests:
@@ -20,7 +19,7 @@ class Tests:
exit_game_mode = ("Exited game mode", "Failed to exit game mode")
# fmt: on
def run():
def C18977329_NvCloth_AddClothSimulationToMesh():
"""
Summary:
Load level with Entity having Mesh and Cloth components already setup. Verify that editor remains stable in Game mode.
@@ -89,4 +88,7 @@ def run():
helper.close_editor()
if __name__ == "__main__":
run()
import ImportPathHelper as imports
imports.init()
from editor_python_test_tools.utils import Report
Report.start_test(C18977329_NvCloth_AddClothSimulationToMesh)
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977330
# Test Case Title : Add cloth simulation to an Actor
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977330
# fmt: off
class Tests:
@@ -20,7 +19,7 @@ class Tests:
exit_game_mode = ("Exited game mode", "Failed to exit game mode")
# fmt: on
def run():
def C18977330_NvCloth_AddClothSimulationToActor():
"""
Summary:
Load level with Entity having Actor and Cloth components already setup. Verify that editor remains stable in Game mode.
@@ -89,4 +88,7 @@ def run():
helper.close_editor()
if __name__ == "__main__":
run()
import ImportPathHelper as imports
imports.init()
from editor_python_test_tools.utils import Report
Report.start_test(C18977330_NvCloth_AddClothSimulationToActor)
@@ -21,14 +21,15 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesti
from base import TestAutomationBase
@pytest.mark.SUITE_main
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
@pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977329_NvCloth_AddClothSimulationToMesh(self, request, workspace, editor, launcher_platform):
from . import C18977329_NvCloth_AddClothSimulationToMesh as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977330_NvCloth_AddClothSimulationToActor(self, request, workspace, editor, launcher_platform):
from . import C18977330_NvCloth_AddClothSimulationToActor as test_module
self._run_test(request, workspace, editor, test_module)
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798177
# Test Case Title : White Box Tool Component can be added to an Entity
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798177
# fmt:off
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798205
# Test Case Title : From the White Box Component Card the White Box Mesh can be set to be invisible in Game View
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798205
# fmt:off
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C29279329
# Test Case Title : White Box mesh shape can be changed with the Default Shape dropdown on the Component
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/29279329
# fmt:off
@@ -18,7 +18,7 @@ import pytest
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
EDITOR_TIMEOUT = 120
EDITOR_TIMEOUT = 300
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@@ -27,6 +27,155 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsMain(object):
# It requires at least one test
def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
pass
@pytest.mark.test_case_id(
"C32078130", # Display Mapper
"C32078129", # Light
"C32078131", # Radius Weight Modifier
"C32078127", # PostFX Layer
"C32078125", # Physical Sky
"C32078115", # Global Skylight (IBL)
"C32078121", # Exposure Control
"C32078120", # Directional Light
"C32078119", # DepthOfField
"C32078118") # Decal (Atom)
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
cfg_args = [level]
expected_lines = [
# Decal (Atom) Component
"Decal (Atom) Entity successfully created",
"Decal (Atom)_test: Component added to the entity: True",
"Decal (Atom)_test: Component removed after UNDO: True",
"Decal (Atom)_test: Component added after REDO: True",
"Decal (Atom)_test: Entered game mode: True",
"Decal (Atom)_test: Exit game mode: True",
"Decal (Atom) Controller|Configuration|Material: SUCCESS",
"Decal (Atom)_test: Entity is hidden: True",
"Decal (Atom)_test: Entity is shown: True",
"Decal (Atom)_test: Entity deleted: True",
"Decal (Atom)_test: UNDO entity deletion works: True",
"Decal (Atom)_test: REDO entity deletion works: True",
# DepthOfField Component
"DepthOfField Entity successfully created",
"DepthOfField_test: Component added to the entity: True",
"DepthOfField_test: Component removed after UNDO: True",
"DepthOfField_test: Component added after REDO: True",
"DepthOfField_test: Entered game mode: True",
"DepthOfField_test: Exit game mode: True",
"DepthOfField_test: Entity disabled initially: True",
"DepthOfField_test: Entity enabled after adding required components: True",
"DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
"DepthOfField_test: Entity is hidden: True",
"DepthOfField_test: Entity is shown: True",
"DepthOfField_test: Entity deleted: True",
"DepthOfField_test: UNDO entity deletion works: True",
"DepthOfField_test: REDO entity deletion works: True",
# Exposure Control Component
"Exposure Control Entity successfully created",
"Exposure Control_test: Component added to the entity: True",
"Exposure Control_test: Component removed after UNDO: True",
"Exposure Control_test: Component added after REDO: True",
"Exposure Control_test: Entered game mode: True",
"Exposure Control_test: Exit game mode: True",
"Exposure Control_test: Entity disabled initially: True",
"Exposure Control_test: Entity enabled after adding required components: True",
"Exposure Control_test: Entity is hidden: True",
"Exposure Control_test: Entity is shown: True",
"Exposure Control_test: Entity deleted: True",
"Exposure Control_test: UNDO entity deletion works: True",
"Exposure Control_test: REDO entity deletion works: True",
# Global Skylight (IBL) Component
"Global Skylight (IBL) Entity successfully created",
"Global Skylight (IBL)_test: Component added to the entity: True",
"Global Skylight (IBL)_test: Component removed after UNDO: True",
"Global Skylight (IBL)_test: Component added after REDO: True",
"Global Skylight (IBL)_test: Entered game mode: True",
"Global Skylight (IBL)_test: Exit game mode: True",
"Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
"Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
"Global Skylight (IBL)_test: Entity is hidden: True",
"Global Skylight (IBL)_test: Entity is shown: True",
"Global Skylight (IBL)_test: Entity deleted: True",
"Global Skylight (IBL)_test: UNDO entity deletion works: True",
"Global Skylight (IBL)_test: REDO entity deletion works: True",
# Physical Sky Component
"Physical Sky Entity successfully created",
"Physical Sky component was added to entity",
"Entity has a Physical Sky component",
"Physical Sky_test: Component added to the entity: True",
"Physical Sky_test: Component removed after UNDO: True",
"Physical Sky_test: Component added after REDO: True",
"Physical Sky_test: Entered game mode: True",
"Physical Sky_test: Exit game mode: True",
"Physical Sky_test: Entity is hidden: True",
"Physical Sky_test: Entity is shown: True",
"Physical Sky_test: Entity deleted: True",
"Physical Sky_test: UNDO entity deletion works: True",
"Physical Sky_test: REDO entity deletion works: True",
# PostFX Layer Component
"PostFX Layer Entity successfully created",
"PostFX Layer_test: Component added to the entity: True",
"PostFX Layer_test: Component removed after UNDO: True",
"PostFX Layer_test: Component added after REDO: True",
"PostFX Layer_test: Entered game mode: True",
"PostFX Layer_test: Exit game mode: True",
"PostFX Layer_test: Entity is hidden: True",
"PostFX Layer_test: Entity is shown: True",
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
# Radius Weight Modifier Component
"Radius Weight Modifier Entity successfully created",
"Radius Weight Modifier_test: Component added to the entity: True",
"Radius Weight Modifier_test: Component removed after UNDO: True",
"Radius Weight Modifier_test: Component added after REDO: True",
"Radius Weight Modifier_test: Entered game mode: True",
"Radius Weight Modifier_test: Exit game mode: True",
"Radius Weight Modifier_test: Entity is hidden: True",
"Radius Weight Modifier_test: Entity is shown: True",
"Radius Weight Modifier_test: Entity deleted: True",
"Radius Weight Modifier_test: UNDO entity deletion works: True",
"Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
"Light_test: Component removed after UNDO: True",
"Light_test: Component added after REDO: True",
"Light_test: Entered game mode: True",
"Light_test: Exit game mode: True",
"Light_test: Entity is hidden: True",
"Light_test: Entity is shown: True",
"Light_test: Entity deleted: True",
"Light_test: UNDO entity deletion works: True",
"Light_test: REDO entity deletion works: True",
# Display Mapper Component
"Display Mapper Entity successfully created",
"Display Mapper_test: Component added to the entity: True",
"Display Mapper_test: Component removed after UNDO: True",
"Display Mapper_test: Component added after REDO: True",
"Display Mapper_test: Entered game mode: True",
"Display Mapper_test: Exit game mode: True",
"Display Mapper_test: Entity is hidden: True",
"Display Mapper_test: Entity is shown: True",
"Display Mapper_test: Entity deleted: True",
"Display Mapper_test: UNDO entity deletion works: True",
"Display Mapper_test: REDO entity deletion works: True",
]
unexpected_lines = [
"failed to open",
"Traceback (most recent call last):",
]
hydra.launch_and_validate_results(
request,
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
null_renderer=True,
cfg_args=cfg_args,
)
@@ -19,170 +19,6 @@ import pytest
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsSandbox(object):
@pytest.mark.test_case_id(
"C32078117", # Area Light
"C32078130", # Display Mapper
"C32078129", # Light
"C32078131", # Radius Weight Modifier
"C32078127", # PostFX Layer
"C32078126", # Point Light
"C32078125", # Physical Sky
"C32078115", # Global Skylight (IBL)
"C32078121", # Exposure Control
"C32078120", # Directional Light
"C32078119", # DepthOfField
"C32078118") # Decal
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
cfg_args = [level]
expected_lines = [
# Decal Component
"Decal (Atom) Entity successfully created",
"Decal (Atom)_test: Component added to the entity: True",
"Decal (Atom)_test: Component removed after UNDO: True",
"Decal (Atom)_test: Component added after REDO: True",
"Decal (Atom)_test: Entered game mode: True",
"Decal (Atom)_test: Exit game mode: True",
"Decal (Atom) Controller|Configuration|Material: SUCCESS",
"Decal (Atom)_test: Entity is hidden: True",
"Decal (Atom)_test: Entity is shown: True",
"Decal (Atom)_test: Entity deleted: True",
"Decal (Atom)_test: UNDO entity deletion works: True",
"Decal (Atom)_test: REDO entity deletion works: True",
# DepthOfField Component
"DepthOfField Entity successfully created",
"DepthOfField_test: Component added to the entity: True",
"DepthOfField_test: Component removed after UNDO: True",
"DepthOfField_test: Component added after REDO: True",
"DepthOfField_test: Entered game mode: True",
"DepthOfField_test: Exit game mode: True",
"DepthOfField_test: Entity disabled initially: True",
"DepthOfField_test: Entity enabled after adding required components: True",
"DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
"DepthOfField_test: Entity is hidden: True",
"DepthOfField_test: Entity is shown: True",
"DepthOfField_test: Entity deleted: True",
"DepthOfField_test: UNDO entity deletion works: True",
"DepthOfField_test: REDO entity deletion works: True",
# Directional Light Component
"Directional Light Entity successfully created",
"Directional Light_test: Component added to the entity: True",
"Directional Light_test: Component removed after UNDO: True",
"Directional Light_test: Component added after REDO: True",
"Directional Light_test: Entered game mode: True",
"Directional Light_test: Exit game mode: True",
"Directional Light Controller|Configuration|Shadow|Camera: SUCCESS",
"Directional Light_test: Entity is hidden: True",
"Directional Light_test: Entity is shown: True",
"Directional Light_test: Entity deleted: True",
"Directional Light_test: UNDO entity deletion works: True",
"Directional Light_test: REDO entity deletion works: True",
# Exposure Control Component
"Exposure Control Entity successfully created",
"Exposure Control_test: Component added to the entity: True",
"Exposure Control_test: Component removed after UNDO: True",
"Exposure Control_test: Component added after REDO: True",
"Exposure Control_test: Entered game mode: True",
"Exposure Control_test: Exit game mode: True",
"Exposure Control_test: Entity disabled initially: True",
"Exposure Control_test: Entity enabled after adding required components: True",
"Exposure Control_test: Entity is hidden: True",
"Exposure Control_test: Entity is shown: True",
"Exposure Control_test: Entity deleted: True",
"Exposure Control_test: UNDO entity deletion works: True",
"Exposure Control_test: REDO entity deletion works: True",
# Global Skylight (IBL) Component
"Global Skylight (IBL) Entity successfully created",
"Global Skylight (IBL)_test: Component added to the entity: True",
"Global Skylight (IBL)_test: Component removed after UNDO: True",
"Global Skylight (IBL)_test: Component added after REDO: True",
"Global Skylight (IBL)_test: Entered game mode: True",
"Global Skylight (IBL)_test: Exit game mode: True",
"Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
"Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
"Global Skylight (IBL)_test: Entity is hidden: True",
"Global Skylight (IBL)_test: Entity is shown: True",
"Global Skylight (IBL)_test: Entity deleted: True",
"Global Skylight (IBL)_test: UNDO entity deletion works: True",
"Global Skylight (IBL)_test: REDO entity deletion works: True",
# Physical Sky Component
"Physical Sky Entity successfully created",
"Physical Sky component was added to entity",
"Entity has a Physical Sky component",
"Physical Sky_test: Component added to the entity: True",
"Physical Sky_test: Component removed after UNDO: True",
"Physical Sky_test: Component added after REDO: True",
"Physical Sky_test: Entered game mode: True",
"Physical Sky_test: Exit game mode: True",
"Physical Sky_test: Entity is hidden: True",
"Physical Sky_test: Entity is shown: True",
"Physical Sky_test: Entity deleted: True",
"Physical Sky_test: UNDO entity deletion works: True",
"Physical Sky_test: REDO entity deletion works: True",
# PostFX Layer Component
"PostFX Layer Entity successfully created",
"PostFX Layer_test: Component added to the entity: True",
"PostFX Layer_test: Component removed after UNDO: True",
"PostFX Layer_test: Component added after REDO: True",
"PostFX Layer_test: Entered game mode: True",
"PostFX Layer_test: Exit game mode: True",
"PostFX Layer_test: Entity is hidden: True",
"PostFX Layer_test: Entity is shown: True",
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
# Radius Weight Modifier Component
"Radius Weight Modifier Entity successfully created",
"Radius Weight Modifier_test: Component added to the entity: True",
"Radius Weight Modifier_test: Component removed after UNDO: True",
"Radius Weight Modifier_test: Component added after REDO: True",
"Radius Weight Modifier_test: Entered game mode: True",
"Radius Weight Modifier_test: Exit game mode: True",
"Radius Weight Modifier_test: Entity is hidden: True",
"Radius Weight Modifier_test: Entity is shown: True",
"Radius Weight Modifier_test: Entity deleted: True",
"Radius Weight Modifier_test: UNDO entity deletion works: True",
"Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
"Light_test: Component removed after UNDO: True",
"Light_test: Component added after REDO: True",
"Light_test: Entered game mode: True",
"Light_test: Exit game mode: True",
"Light_test: Entity is hidden: True",
"Light_test: Entity is shown: True",
"Light_test: Entity deleted: True",
"Light_test: UNDO entity deletion works: True",
"Light_test: REDO entity deletion works: True",
# Display Mapper Component
"Display Mapper Entity successfully created",
"Display Mapper_test: Component added to the entity: True",
"Display Mapper_test: Component removed after UNDO: True",
"Display Mapper_test: Component added after REDO: True",
"Display Mapper_test: Entered game mode: True",
"Display Mapper_test: Exit game mode: True",
"Display Mapper_test: Entity is hidden: True",
"Display Mapper_test: Entity is shown: True",
"Display Mapper_test: Entity deleted: True",
"Display Mapper_test: UNDO entity deletion works: True",
"Display Mapper_test: REDO entity deletion works: True",
]
unexpected_lines = [
"failed to open",
"Traceback (most recent call last):",
]
hydra.launch_and_validate_results(
request,
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
null_renderer=True,
cfg_args=cfg_args,
)
# It requires at least one test
def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
pass
@@ -98,5 +98,5 @@ if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
from editor_python_test_tools.utils import Report
Report.start_test(C14861501_PhysXCollider_RenderMeshAutoAssigned)
@@ -68,7 +68,7 @@ def C14976308_ScriptCanvas_SetKinematicTargetTransform():
the script deactivates Signal, Sphere's transform will update to that of Transform_Target.
NOTE: There is a known bug (LY-107723) which causes the rotation to update to a value that is not sufficiently close
to the expected result when using Set Kinematic Target which will cause the test to fail:
https://jira.agscollab.com/browse/LY-107723
LY-107723
Test Steps:
1) Open level and enter game mode
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C3510644
# Test Case Title : Check that the collision layer and collision group of the terrain can be changed
# and the collision behavior of the terrain changes accordingly
# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/3510644
# fmt: off
@@ -114,5 +114,5 @@ if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
from editor_python_test_tools.utils import Report
Report.start_test(C4044695_PhysXCollider_AddMultipleSurfaceFbx)
@@ -239,7 +239,7 @@ def C6321601_Force_HighValuesDirectionAxes():
force_notification_handler.add_callback("OnCalculateNetForce", on_calc_net_force)
# Wait for 3 secs, because there is a known bug identified and filed in
# JIRA https://jira.agscollab.com/browse/LY-107677
# JIRA LY-107677
# The error "[Error] Huge object being added to a COctreeNode, name: 'MeshComponentRenderNode', objBox:"
# will show (if occured) in about 3 sec into the game mode.
helper.wait_for_condition(has_physx_error, 3.0)
@@ -50,7 +50,7 @@ class TestAutomation(TestAutomationBase):
unexpected_lines = ["Assert"]
self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines)
# BUG: https://jira.agscollab.com/browse/LY-107723")
# BUG: LY-107723")
def test_C14976308_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor):
from . import C14976308_ScriptCanvas_SetKinematicTargetTransform as test_module
@@ -429,6 +429,8 @@ class TestAutomation(TestAutomationBase):
from . import C4976236_AddPhysxColliderComponent as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.xfail(
reason="This will fail due to this issue ATOM-15487.")
def test_C14861502_PhysXCollider_AssetAutoAssigned(self, request, workspace, editor, launcher_platform):
from . import C14861502_PhysXCollider_AssetAutoAssigned as test_module
self._run_test(request, workspace, editor, test_module)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
'''
This unittest might have to be refactored once changes to Physmaterial_Editor.py are made.
These changes will occur after the but, reverence below is resloved.
Bug: https://jira.agscollab.com/browse/LY-107392
Bug: LY-107392
'''
class Tests:
opening_bad_file = ("Bad file could not be opened", "Bad file was opened")
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569013
Test Case Title: Script Event file can be created
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569013
"""
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568942
Test Case Title: Clicking the "+" button and selecting "New Script Event" opens the
Asset Editor with a new Script Event asset
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568942
"""
from PySide2 import QtWidgets
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568856
Test Case Title: Multiple Entities can be targeted in the Debugger tool
URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568856
"""
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569137
Test Case Title: Multiple Graphs can be targeted in the Debugger tool
URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569137
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702824
Test Case Title: Docking
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702824
"""
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569049
Test Case Title: Edit > Undo undoes the last action
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569049
Test case ID: T92569051
Test Case Title: Edit > Redo redoes the last undone action
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569051
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562978
Test Case Title: Script Canvas Component can be added to an entity
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562978
"""
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569037
Test Case Title: File > New Script creates a new script
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569037
Test case ID: T92569039
Test Case Title: File > Open opens the Open... dialog
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569039
"""
import os
@@ -11,11 +11,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563070
Test Case Title: Graphs can be closed by clicking X on the Graph name tab
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563070
Test case ID: T92563068
Test Case Title: Save Prompt: User is prompted to save a graph on close after
creating a new graph
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563068
"""
import os
@@ -11,10 +11,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569079
Test Case Title: View > Zoom In zooms the graph in
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569079
Test case ID: T92569081
Test Case Title: View > Zoom In zooms the graph out
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569081
"""
@@ -9,9 +9,9 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
def init():
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools')
@@ -0,0 +1,128 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562988
Test Case Title: Left-click/double click expands and collapses node categories
"""
# fmt: off
class Tests():
pane_open = ("Script Canvas pane successfully opened", "Script Canvas pane failed to open")
click_expand = ("Category expanded on left click", "Category failed to expand on left click")
click_collapse = ("Category collapsed on left click", "Category failed to collapse on left click")
dClick_expand = ("Category expanded on double click", "Category failed to expand on double click")
dClick_collapse = ("Category collapsed on double click", "Category failed to collapse on double click")
# fmt: on
def NodeCategory_ExpandOnClick():
"""
Summary:
Verifying the expand/collapse functionality on node categories
Expected Behavior:
The node category should expand when double clicked or when the drop down indicator is
left-clicked. Once expanded, it should be collapsed via the same actions.
Test Steps:
1) Open Script Canvas pane
2) Get the SC window objects
3) Ensure all categories are collapsed for a clean state
4) Left-Click on a node category arrow to expand it
5) Verify it expanded
6) Left-Click on a node category arrow to collapse it
7) Verify it collapsed
8) Double-Click on a node category to expand it
9) Verify it expanded
10) Double-Click on a node category to collapse it
11) Verify it collapsed
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
from utils import Report
from PySide2 import QtCore, QtWidgets, QtTest
from PySide2.QtTest import QTest
import pyside_utils
import azlmbr.legacy.general as general
def left_click_arrow(item_view, index):
original_state = item_view.isExpanded(index)
rect_center_y = item_view.visualRect(index).center().y()
rect_left_x = item_view.visualRect(index).left()
for i in range(5): # this range can be increased for safe side
QtTest.QTest.mouseClick(
item_view.viewport(),
QtCore.Qt.LeftButton,
QtCore.Qt.NoModifier,
QtCore.QPoint(rect_left_x - i, rect_center_y),
)
if item_view.isExpanded(index) != original_state:
break
def double_click(item_view, index):
item_index_center = item_view.visualRect(index).center()
# Left click on the item before trying to double click, will otherwise fail to expand
# as first click would highlight and second click would be a 'single click'
pyside_utils.item_view_index_mouse_click(item_view, index)
QTest.mouseDClick(item_view.viewport(), QtCore.Qt.LeftButton, QtCore.Qt.NoModifier, item_index_center)
# 1) Open Script Canvas pane
general.open_pane("Script Canvas")
Report.critical_result(Tests.pane_open, general.is_pane_visible("Script Canvas"))
# 2) Get the SC window objects
editor_window = pyside_utils.get_editor_main_window()
sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
action.trigger()
node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
nodeTree = node_palette.findChild(QtWidgets.QTreeView, "treeView")
ai_index = pyside_utils.find_child_by_pattern(nodeTree, "AI")
# 3) Ensure all categories are collapsed for a clean state
nodeTree.collapseAll()
# 4) Left-Click on a node category arrow to expand it
left_click_arrow(nodeTree, ai_index)
# 5) Verify it expanded
Report.result(Tests.click_expand, nodeTree.isExpanded(ai_index))
# 6) Left-Click on a node category arrow to collapse it
left_click_arrow(nodeTree, ai_index)
# 7) Verify it collapsed
Report.result(Tests.click_collapse, not nodeTree.isExpanded(ai_index))
# 8) Double-Click on a node category to expand it
double_click(nodeTree, ai_index)
# 9) Verify it expanded
Report.result(Tests.dClick_expand, nodeTree.isExpanded(ai_index))
# 10) Double-Click on a node category to collapse it
double_click(nodeTree, ai_index)
# 11) Verify it collapsed
Report.result(Tests.dClick_collapse, not nodeTree.isExpanded(ai_index))
if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(NodeCategory_ExpandOnClick)
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568982
Test Case Title: Renaming variables in the Node Inspector
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568982
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562993
Test Case Title: Clicking the X button on the Search Box clears the currently entered string
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562993
"""
@@ -0,0 +1,91 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
# fmt: off
class Tests():
set_search_string = ("Search string is set", "Search string is not set")
search_string_deleted = ("Search string deleted as expected", "Search string not deleted")
# fmt: on
def NodePalette_SearchText_Deletion():
"""
Summary:
We enter some string in the Node Palette Search box, select that text and delete it.
Expected Behavior:
After RightClick->Delete the text in the Searchbox should be deleted.
Test Steps:
1) Open Script Canvas window (Tools > Script Canvas)
2) Get the SC window object
3) Open Node Manager if not opened already
4) Set some string in the Search box
5) Verify if the test string is set
6) Delete search string using right click and verify if it is cleared
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
from PySide2 import QtWidgets, QtTest, QtCore
from utils import TestHelper as helper
import azlmbr.legacy.general as general
import pyside_utils
TEST_STRING = "TestString"
# 1) Open Script Canvas window (Tools > Script Canvas)
general.idle_enable(True)
general.open_pane("Script Canvas")
helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 3.0)
# 2) Get the SC window object
editor_window = pyside_utils.get_editor_main_window()
sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
# 3) Open Node Manager if not opened already
if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
action.trigger()
node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
search_frame = node_palette.findChild(QtWidgets.QFrame, "searchFrame")
# 4) Set some string in the Search box
search_box = search_frame.findChild(QtWidgets.QLineEdit, "searchFilter")
search_box.setText(TEST_STRING)
# 5) Verify if the test string is set
result = helper.wait_for_condition(lambda: search_box.text() == TEST_STRING, 1.0)
Report.result(Tests.set_search_string, result)
# 6) Delete search string using right click and verify if it is cleared
QtTest.QTest.keyClick(search_box, QtCore.Qt.Key_A, QtCore.Qt.ControlModifier)
pyside_utils.trigger_context_menu_entry(search_box, "Delete")
result = helper.wait_for_condition(lambda: search_box.text() == "", 2.0)
Report.result(Tests.search_string_deleted, result)
if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(NodePalette_SearchText_Deletion)
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92568940
Test Case Title: Categories and Nodes can be selected
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568940
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92569253 // T92569254
Test Case Title: On Entity Activated // On Entity Deactivated
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569253 // https://testrail.agscollab.com/index.php?/tests/view/92569254
"""
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702834 // C1702823
Test Case Title: Opening pane // Closing pane
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702834 and
https://testrail.agscollab.com/index.php?/cases/view/1702823
"""
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702821 // C1702832
Test Case Title: Retain visibility, size and location upon Script Canvas restart
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702821 and
https://testrail.agscollab.com/index.php?/cases/view/1702832
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702829
Test Case Title: Resizing pane
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702829
"""
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92562986
Test Case Title: Changing the assigned Script Canvas Asset on an entity properly updates
level functionality
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562986
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563190
Test Case Title: A single Entity with two Script Canvas components works properly
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563190
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92563191
Test Case Title: Two Entities can use the same Graph asset successfully at RunTime
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563191
"""
@@ -0,0 +1,112 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test Case Title: Event can return a value of set type successfully
"""
# fmt: off
class Tests():
level_created = ("Successfully created temporary level", "Failed to create temporary level")
entity_created = ("Successfully created test entity", "Failed to create test entity")
enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
lines_found = ("Successfully found expected message", "Failed to find expected message")
exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
# fmt: on
def ScriptEvents_ReturnSetType_Successfully():
"""
Summary: A temporary level is created with an Entity having ScriptCanvas component.
ScriptEvent(T92569006_ScriptEvent.scriptevents) is created with one Method that has a return value.
ScriptCanvas(T92569006_ScriptCanvas.scriptcanvas) is attached to Entity. Graph has Send node that sends the Method
of the ScriptEvent and prints the returned result ( On Entity Activated -> Send node -> Print) and Receive node is
set to return custom value ( Receive node -> Print).
Verify that the entity containing T92569006_ScriptCanvas.scriptcanvas should print the custom value set in both
Send and Receive nodes.
Expected Behavior:
After entering game mode, the graph on the entity should print an expected message to the console
Test Steps:
1) Create test level
2) Create test entity
3) Start Tracer
4) Enter Game Mode
5) Read for line
6) Exit Game Mode
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import os
from editor_entity_utils import EditorEntity as Entity
from utils import Report
from utils import TestHelper as helper
from utils import Tracer
import azlmbr.legacy.general as general
import azlmbr.asset as asset
import azlmbr.math as math
import azlmbr.bus as bus
LEVEL_NAME = "tmp_level"
WAIT_TIME = 3.0 # SECONDS
EXPECTED_LINES = ["T92569006_ScriptEvent_Sent", "T92569006_ScriptEvent_Received"]
SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92569006_ScriptCanvas.scriptcanvas")
def create_editor_entity(name, sc_asset):
entity = Entity.create_editor_entity(name)
sc_comp = entity.add_component("Script Canvas")
asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
Report.critical_result(Tests.entity_created, entity.id.isValid())
def locate_expected_lines(line_list: list):
found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
return all(line in found_lines for line in line_list)
# 1) Create temp level
general.idle_enable(True)
result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
Report.critical_result(Tests.level_created, result == 0)
helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
general.close_pane("Error Report")
# 2) Create test entity
create_editor_entity("TestEntity", SC_ASSET_PATH)
# 3) Start Tracer
with Tracer() as section_tracer:
# 4) Enter Game Mode
helper.enter_game_mode(Tests.enter_game_mode)
# 5) Read for line
lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
Report.result(Tests.lines_found, lines_located)
# 6) Exit Game Mode
helper.exit_game_mode(Tests.exit_game_mode)
if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(ScriptEvents_ReturnSetType_Successfully)
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92567321
Test Case Title: Script Events: Can send and receive a script event across multiple entities successfully
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567321
"""
@@ -10,7 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92567320
Test Case Title: Script Events: Can send and receive a script event successfully
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567320
"""
@@ -183,6 +183,23 @@ class TestAutomation(TestAutomationBase):
from . import ScriptEvents_SendReceiveSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.parametrize("level", ["tmp_level"])
def test_ScriptEvents_ReturnSetType_Successfully(self, request, workspace, editor, launcher_platform, project, level):
def teardown():
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
request.addfinalizer(teardown)
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
from . import ScriptEvents_ReturnSetType_Successfully as test_module
self._run_test(request, workspace, editor, test_module)
def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform):
from . import NodeCategory_ExpandOnClick as test_module
self._run_test(request, workspace, editor, test_module)
def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform):
from . import NodePalette_SearchText_Deletion as test_module
self._run_test(request, workspace, editor, test_module)
# NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method
# fails because of pyside_utils import
@pytest.mark.SUITE_periodic
@@ -251,4 +268,4 @@ class TestScriptCanvasTests(object):
expected_lines,
auto_test_mode=False,
timeout=60,
)
)
@@ -13,11 +13,6 @@ Test Case Title: Tools > Node Palette toggles the Node Palette
Tools > Node Inspector toggles the Node Inspector
Tools > Bookmarks toggles the Bookmarks
Tools > Variable Manager toggles the Variable Manager
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/92569165
https://testrail.agscollab.com/index.php?/cases/view/92569167
https://testrail.agscollab.com/index.php?/cases/view/92569168
https://testrail.agscollab.com/index.php?/cases/view/92569170
"""
@@ -10,8 +10,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702825 // C1702831
Test Case Title: Undocking // Closing script canvas with the pane floating
URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702825 &
https://testrail.agscollab.com/index.php?/cases/view/1702831
"""
@@ -10,10 +10,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: T92564789
Test Case Title: Each Variable type can be created
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92564789
Test case ID: T92568873
Test Case Title: Each Variable type can be deleted
URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568873
"""