Convert automated tests related to content and unused levels (#7416)
* Convert automated tests related to content/WaterSample level/Physics's Base level Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Fix nits Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Add missing .prefab level file Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Fix nits Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Convert Blast tests Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Convert scripting tests Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Remove useless comments Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com> * Revert Collider_AddColliderComponent change until prefab error message bug fixed Signed-off-by: chiyenteng <82238204+chiyenteng@users.noreply.github.com>
This commit is contained in:
@@ -52,11 +52,11 @@ class TestAutomation(TestAutomationBase):
|
||||
@revert_physics_config
|
||||
def test_CharacterController_SwitchLevels(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.character_controller import CharacterController_SwitchLevels as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_Ragdoll_AddPhysxRagdollComponentWorks(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.ragdoll import Ragdoll_AddPhysxRagdollComponentWorks as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_ScriptCanvas_MultipleRaycastNode(self, request, workspace, editor, launcher_platform):
|
||||
@@ -81,7 +81,7 @@ class TestAutomation(TestAutomationBase):
|
||||
@revert_physics_config
|
||||
def test_Collider_PxMeshConvexMeshCollides(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_PxMeshConvexMeshCollides as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_ShapeCollider_CylinderShapeCollides(self, request, workspace, editor, launcher_platform):
|
||||
|
||||
@@ -53,7 +53,8 @@ class EditorSingleTest_WithFileOverrides(EditorSingleTest):
|
||||
for f in original_file_list:
|
||||
fm._restore_file(f, file_list[f])
|
||||
|
||||
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||
|
||||
# @pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||
@pytest.mark.SUITE_main
|
||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||
@@ -72,6 +73,48 @@ class TestAutomationWithPrefabSystemEnabled(EditorTestSuite):
|
||||
class C4982802_PhysXColliderShape_CanBeSelected(EditorSharedTest):
|
||||
from .tests.collider import Collider_CapsuleShapeEditing as test_module
|
||||
|
||||
class C14654881_CharacterController_SwitchLevels(EditorSharedTest):
|
||||
from .tests.character_controller import CharacterController_SwitchLevels as test_module
|
||||
|
||||
class C14861500_DefaultSetting_ColliderShape(EditorSharedTest):
|
||||
from .tests.collider import Collider_CheckDefaultShapeSettingIsPxMesh as test_module
|
||||
|
||||
class C4044695_PhysXCollider_AddMultipleSurfaceFbx(EditorSharedTest):
|
||||
from .tests.collider import Collider_MultipleSurfaceSlots as test_module
|
||||
|
||||
class C14861501_PhysXCollider_RenderMeshAutoAssigned(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent as test_module
|
||||
|
||||
@pytest.mark.xfail(reason="This will fail due to this issue ATOM-15487.")
|
||||
class C14861502_PhysXCollider_AssetAutoAssigned(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent as test_module
|
||||
|
||||
class C4982803_Enable_PxMesh_Option(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshConvexMeshCollides as test_module
|
||||
|
||||
class C15096740_Material_LibraryUpdatedCorrectly(EditorSharedTest):
|
||||
from .tests.material import Material_LibraryClearingAssignsDefault as test_module
|
||||
|
||||
class C17411467_AddPhysxRagdollComponent(EditorSharedTest):
|
||||
from .tests.ragdoll import Ragdoll_AddPhysxRagdollComponentWorks as test_module
|
||||
|
||||
class C19578021_ShapeCollider_CanBeAdded(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_CanBeAddedWitNoWarnings as test_module
|
||||
|
||||
class C19578018_ShapeColliderWithNoShapeComponent(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_InactiveWhenNoShapeComponent as test_module
|
||||
|
||||
class C19723164_ShapeCollider_WontCrashEditor(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor as test_module
|
||||
|
||||
class C12905528_ForceRegion_WithNonTriggerCollider(EditorSharedTest):
|
||||
from .tests.force_region import ForceRegion_WithNonTriggerColliderWarning as test_module
|
||||
# Fixme: expected_lines = ["[Warning] (PhysX Force Region) - Please ensure collider component marked as trigger exists in entity"]
|
||||
|
||||
class C14861504_RenderMeshAsset_WithNoPxAsset(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx as test_module
|
||||
|
||||
|
||||
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||
@pytest.mark.SUITE_main
|
||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||
@@ -115,19 +158,13 @@ class TestAutomation(EditorTestSuite):
|
||||
|
||||
class C14654881_CharacterController_SwitchLevels(EditorSharedTest):
|
||||
from .tests.character_controller import CharacterController_SwitchLevels as test_module
|
||||
|
||||
class C17411467_AddPhysxRagdollComponent(EditorSharedTest):
|
||||
from .tests.ragdoll import Ragdoll_AddPhysxRagdollComponentWorks as test_module
|
||||
|
||||
|
||||
class C12712453_ScriptCanvas_MultipleRaycastNode(EditorSharedTest):
|
||||
from .tests.script_canvas import ScriptCanvas_MultipleRaycastNode as test_module
|
||||
|
||||
class C18243586_Joints_HingeLeadFollowerCollide(EditorSharedTest):
|
||||
from .tests.joints import Joints_HingeLeadFollowerCollide as test_module
|
||||
|
||||
class C4982803_Enable_PxMesh_Option(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshConvexMeshCollides as test_module
|
||||
|
||||
class C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_CylinderShapeCollides as test_module
|
||||
|
||||
@@ -297,19 +334,6 @@ class TestAutomation(EditorTestSuite):
|
||||
class C18243591_Joints_BallLeadFollowerCollide(EditorSharedTest):
|
||||
from .tests.joints import Joints_BallLeadFollowerCollide as test_module
|
||||
|
||||
class C19578018_ShapeColliderWithNoShapeComponent(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_InactiveWhenNoShapeComponent as test_module
|
||||
|
||||
class C14861500_DefaultSetting_ColliderShape(EditorSharedTest):
|
||||
from .tests.collider import Collider_CheckDefaultShapeSettingIsPxMesh as test_module
|
||||
|
||||
class C19723164_ShapeCollider_WontCrashEditor(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor as test_module
|
||||
|
||||
class C12905528_ForceRegion_WithNonTriggerCollider(EditorSharedTest):
|
||||
from .tests.force_region import ForceRegion_WithNonTriggerColliderWarning as test_module
|
||||
# Fixme: expected_lines = ["[Warning] (PhysX Force Region) - Please ensure collider component marked as trigger exists in entity"]
|
||||
|
||||
class C5932040_ForceRegion_CubeExertsWorldForce(EditorSharedTest):
|
||||
from .tests.force_region import ForceRegion_WorldSpaceForceOnRigidBodies as test_module
|
||||
|
||||
@@ -321,26 +345,10 @@ class TestAutomation(EditorTestSuite):
|
||||
|
||||
class C5959809_ForceRegion_RotationalOffset(EditorSharedTest):
|
||||
from .tests.force_region import ForceRegion_RotationalOffset as test_module
|
||||
|
||||
class C15096740_Material_LibraryUpdatedCorrectly(EditorSharedTest):
|
||||
from .tests.material import Material_LibraryClearingAssignsDefault as test_module
|
||||
|
||||
|
||||
class C4976236_AddPhysxColliderComponent(EditorSharedTest):
|
||||
from .tests.collider import Collider_AddColliderComponent as test_module
|
||||
|
||||
@pytest.mark.xfail(reason="This will fail due to this issue ATOM-15487.")
|
||||
class C14861502_PhysXCollider_AssetAutoAssigned(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent as test_module
|
||||
|
||||
class C14861501_PhysXCollider_RenderMeshAutoAssigned(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent as test_module
|
||||
|
||||
class C4044695_PhysXCollider_AddMultipleSurfaceFbx(EditorSharedTest):
|
||||
from .tests.collider import Collider_MultipleSurfaceSlots as test_module
|
||||
|
||||
class C14861504_RenderMeshAsset_WithNoPxAsset(EditorSharedTest):
|
||||
from .tests.collider import Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx as test_module
|
||||
|
||||
class C100000_RigidBody_EnablingGravityWorksPoC(EditorSharedTest):
|
||||
from .tests.rigid_body import RigidBody_EnablingGravityWorksPoC as test_module
|
||||
|
||||
@@ -350,8 +358,5 @@ class TestAutomation(EditorTestSuite):
|
||||
class C6090547_ForceRegion_ParentChildForceRegions(EditorSharedTest):
|
||||
from .tests.force_region import ForceRegion_ParentChildForcesCombineForces as test_module
|
||||
|
||||
class C19578021_ShapeCollider_CanBeAdded(EditorSharedTest):
|
||||
from .tests.shape_collider import ShapeCollider_CanBeAddedWitNoWarnings as test_module
|
||||
|
||||
class C15425929_Undo_Redo(EditorSharedTest):
|
||||
from .tests import Physics_UndoRedoWorksOnEntityWithPhysComponents as test_module
|
||||
|
||||
@@ -388,17 +388,17 @@ class TestAutomation(TestAutomationBase):
|
||||
@revert_physics_config
|
||||
def test_ShapeCollider_InactiveWhenNoShapeComponent(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.shape_collider import ShapeCollider_InactiveWhenNoShapeComponent as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_Collider_CheckDefaultShapeSettingIsPxMesh(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_CheckDefaultShapeSettingIsPxMesh as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.shape_collider import ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_Collider_SphereShapeEditing(self, request, workspace, editor, launcher_platform):
|
||||
@@ -418,7 +418,7 @@ class TestAutomation(TestAutomationBase):
|
||||
def test_ForceRegion_WithNonTriggerColliderWarning(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.force_region import ForceRegion_WithNonTriggerColliderWarning as test_module
|
||||
# Fixme: expected_lines = ["[Warning] (PhysX Force Region) - Please ensure collider component marked as trigger exists in entity"]
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_ForceRegion_WorldSpaceForceOnRigidBodies(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.force_region import ForceRegion_WorldSpaceForceOnRigidBodies as test_module
|
||||
@@ -438,8 +438,12 @@ class TestAutomation(TestAutomationBase):
|
||||
|
||||
def test_Material_LibraryClearingAssignsDefault(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.material import Material_LibraryClearingAssignsDefault as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@pytest.mark.xfail(reason=
|
||||
"Test failed due to an error message shown while in game mode: "
|
||||
"'(Prefab) - Invalid asset found referenced in scene while entering game mode. "
|
||||
"The asset was stored in an instance of Asset.'")
|
||||
def test_Collider_AddColliderComponent(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_AddColliderComponent as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
@@ -448,19 +452,19 @@ class TestAutomation(TestAutomationBase):
|
||||
reason="This will fail due to this issue ATOM-15487.")
|
||||
def test_Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_Collider_MultipleSurfaceSlots(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_MultipleSurfaceSlots as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.collider import Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
def test_RigidBody_EnablingGravityWorksPoC(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.rigid_body import RigidBody_EnablingGravityWorksPoC as test_module
|
||||
@@ -486,7 +490,7 @@ class TestAutomation(TestAutomationBase):
|
||||
@revert_physics_config
|
||||
def test_ShapeCollider_CanBeAddedWitNoWarnings(self, request, workspace, editor, launcher_platform):
|
||||
from .tests.shape_collider import ShapeCollider_CanBeAddedWitNoWarnings as test_module
|
||||
self._run_test(request, workspace, editor, test_module, enable_prefab_system=False)
|
||||
self._run_test(request, workspace, editor, test_module)
|
||||
|
||||
@revert_physics_config
|
||||
def test_Physics_UndoRedoWorksOnEntityWithPhysComponents(self, request, workspace, editor, launcher_platform):
|
||||
|
||||
+3
-1
@@ -53,10 +53,12 @@ def CharacterController_SwitchLevels():
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from editor_python_test_tools.utils import Report
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
import azlmbr.legacy.general as general
|
||||
import azlmbr.bus
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Constants
|
||||
WAIT_FOR_ERRORS = 3.0
|
||||
@@ -77,7 +79,7 @@ def CharacterController_SwitchLevels():
|
||||
helper.exit_game_mode(Tests.level1_exit_game_mode)
|
||||
|
||||
# 2.1) Load level 2 (empty level)
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2.2) Enter game mode
|
||||
helper.enter_game_mode(Tests.level2_enter_game_mode)
|
||||
|
||||
+3
-2
@@ -45,14 +45,15 @@ def Collider_CheckDefaultShapeSettingIsPxMesh():
|
||||
from editor_python_test_tools.utils import Report
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.legacy.general as general
|
||||
|
||||
PHYSICS_ASSET_INDEX = 7 # Hardcoded enum index value for Shape property
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity to hold the PhysX Shape Collider component
|
||||
collider_entity = Entity.create_editor_entity("Collider")
|
||||
|
||||
+3
-2
@@ -54,6 +54,8 @@ def Collider_MultipleSurfaceSlots():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Constants
|
||||
PHYSICS_ASSET_INDEX = 7 # Hardcoded enum index value for Shape property
|
||||
SURFACE_TAG_COUNT = 4 # Number of surface tags included in used asset
|
||||
@@ -62,9 +64,8 @@ def Collider_MultipleSurfaceSlots():
|
||||
STATIC_MESH = os.path.join("assets", "Physics", "Collider_MultipleSurfaceSlots", "test.azmodel")
|
||||
PHYSX_MESH = os.path.join("assets", "Physics","Collider_MultipleSurfaceSlots", "test.pxmesh")
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity
|
||||
test_entity = Entity.create_editor_entity("test_entity")
|
||||
|
||||
+3
-2
@@ -54,15 +54,16 @@ def Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Asset paths
|
||||
STATIC_MESH = os.path.join("assets", "Physics", "Collider_PxMeshAutoAssigned", "spherebot", "r0-b_body.azmodel")
|
||||
PHYSX_MESH = os.path.join(
|
||||
"assets", "Physics", "Collider_PxMeshAutoAssigned", "spherebot", "r0-b_body.pxmesh"
|
||||
)
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity
|
||||
test_entity = Entity.create_editor_entity("test_entity")
|
||||
|
||||
+3
-2
@@ -53,6 +53,8 @@ def Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.legacy.general as general
|
||||
|
||||
@@ -60,9 +62,8 @@ def Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent():
|
||||
MESH_PROPERTY_PATH = "Controller|Configuration|Mesh Asset"
|
||||
TESTED_PROPERTY_PATH = "Shape Configuration|Asset|PhysX Mesh"
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity
|
||||
test_entity = Entity.create_editor_entity("test_entity")
|
||||
|
||||
+3
-2
@@ -62,7 +62,9 @@ def Collider_PxMeshConvexMeshCollides():
|
||||
from editor_python_test_tools.utils import Report
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import azlmbr.math as math
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr
|
||||
@@ -73,9 +75,8 @@ def Collider_PxMeshConvexMeshCollides():
|
||||
MESH_ASSET_PATH = os.path.join("assets", "Physics", "Collider_PxMeshConvexMeshCollides", "spherebot", "r0-b_body.pxmesh")
|
||||
TIMEOUT = 2.0
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create test entity
|
||||
collider = EditorEntity.create_editor_entity_at([512.0, 512.0, 33.0], "Collider")
|
||||
|
||||
+3
-2
@@ -59,15 +59,16 @@ def Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx():
|
||||
from editor_python_test_tools.utils import Tracer
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.asset as azasset
|
||||
|
||||
# Asset paths
|
||||
STATIC_MESH = os.path.join("assets", "Physics", "Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx", "test_asset.azmodel")
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity
|
||||
test_entity = Entity.create_editor_entity("test_entity")
|
||||
|
||||
+3
-3
@@ -44,15 +44,15 @@ def ForceRegion_WithNonTriggerColliderWarning():
|
||||
:return: None
|
||||
"""
|
||||
import azlmbr.legacy.general as general
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
from editor_python_test_tools.editor_entity_utils import EditorEntity
|
||||
from editor_python_test_tools.utils import Report
|
||||
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.utils import Tracer
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create test entity
|
||||
test_entity = EditorEntity.create_editor_entity("TestEntity")
|
||||
|
||||
+3
-2
@@ -57,6 +57,8 @@ def Material_LibraryClearingAssignsDefault():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.asset_utils import Asset
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.asset as azasset
|
||||
|
||||
@@ -66,9 +68,8 @@ def Material_LibraryClearingAssignsDefault():
|
||||
default_material_path = os.path.join("assets", "physics", "surfacetypemateriallibrary.physmaterial")
|
||||
new_material_path = os.path.join("physicssurfaces", "default_phys_materials.physmaterial")
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create new Entity with PhysX Character Controller
|
||||
test_entity = EditorEntity.create_editor_entity("TestEntity")
|
||||
|
||||
+3
-2
@@ -49,9 +49,10 @@ def Ragdoll_AddPhysxRagdollComponentWorks():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.utils import Tracer
|
||||
|
||||
helper.init_idle()
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# 1) Load the level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create test entity
|
||||
test_entity = EditorEntity.create_editor_entity("TestEntity")
|
||||
|
||||
+3
-2
@@ -50,12 +50,13 @@ def ShapeCollider_CanBeAddedWitNoWarnings():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.utils import Tracer
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.legacy.general as general
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create an entity
|
||||
collider_entity = Entity.create_editor_entity("Collider")
|
||||
|
||||
+3
-2
@@ -54,6 +54,8 @@ def ShapeCollider_InactiveWhenNoShapeComponent():
|
||||
from editor_python_test_tools.editor_entity_utils import EditorEntity
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.bus as bus
|
||||
import azlmbr.editor as editor
|
||||
@@ -65,9 +67,8 @@ def ShapeCollider_InactiveWhenNoShapeComponent():
|
||||
"""
|
||||
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", component_id)
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Add an entity with a PhysX Shape Collider component.
|
||||
collider = EditorEntity.create_editor_entity("Collider")
|
||||
|
||||
+3
-2
@@ -45,6 +45,8 @@ def ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor():
|
||||
from editor_python_test_tools.utils import TestHelper as helper
|
||||
from editor_python_test_tools.editor_entity_utils import EditorEntity as Entity
|
||||
|
||||
import editor_python_test_tools.hydra_editor_utils as hydra
|
||||
|
||||
# Open 3D Engine Imports
|
||||
import azlmbr.legacy.general as general
|
||||
|
||||
@@ -61,9 +63,8 @@ def ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor():
|
||||
# Wait 60 frames more
|
||||
general.idle_wait_frames(60)
|
||||
|
||||
helper.init_idle()
|
||||
# 1) Load the empty level
|
||||
helper.open_level("Physics", "Base")
|
||||
hydra.open_base_level()
|
||||
|
||||
# 2) Create 512 entities with PhysX Shape Collider and Sphere Shape components
|
||||
entity_failure = False
|
||||
|
||||
Reference in New Issue
Block a user