TestSuite_Main.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. """
  2. Copyright (c) Contributors to the Open 3D Engine Project.
  3. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. """
  6. import pytest
  7. from ly_test_tools.o3de.editor_test import EditorBatchedTest, EditorTestSuite
  8. @pytest.mark.SUITE_main
  9. @pytest.mark.parametrize("launcher_platform", ['windows_editor'])
  10. @pytest.mark.parametrize("project", ["AutomatedTesting"])
  11. class TestAutomationOverridesDisabled(EditorTestSuite):
  12. # These tests will execute with Outliner Overrides/Inspector DPE/Inspector Overrides disabled
  13. EditorTestSuite.global_extra_cmdline_args.extend(
  14. [f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableOutlinerOverrideManagement=false",
  15. f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableInspectorOverrideManagement=false",
  16. f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableDPEInspector=false"])
  17. # Add Entity Tests
  18. class test_AddEntity_UnderAnotherEntity(EditorBatchedTest):
  19. from .tests.add_entity import AddEntity_UnderAnotherEntity as test_module
  20. class test_AddEntity_UnderChildEntityOfPrefab(EditorBatchedTest):
  21. from .tests.add_entity import AddEntity_UnderChildEntityOfPrefab as test_module
  22. class test_AddEntity_UnderContainerEntityOfPrefab(EditorBatchedTest):
  23. from .tests.add_entity import AddEntity_UnderContainerEntityOfPrefab as test_module
  24. class test_AddEntity_UnderLevelPrefab(EditorBatchedTest):
  25. from .tests.add_entity import AddEntity_UnderLevelPrefab as test_module
  26. # Create Prefab Tests
  27. class test_CreatePrefab_ComponentConfigurationRetained(EditorBatchedTest):
  28. from .tests.create_prefab import CreatePrefab_ComponentConfigurationRetained as test_module
  29. class test_CreatePrefab_CreationFailsWithDifferentRootEntities(EditorBatchedTest):
  30. from .tests.create_prefab import CreatePrefab_CreationFailsWithDifferentRootEntities as test_module
  31. class test_CreatePrefab_UnderAnEntity(EditorBatchedTest):
  32. from .tests.create_prefab import CreatePrefab_UnderAnEntity as test_module
  33. class test_CreatePrefab_UnderAnotherPrefab(EditorBatchedTest):
  34. from .tests.create_prefab import CreatePrefab_UnderAnotherPrefab as test_module
  35. class test_CreatePrefab_UnderChildEntityOfAnotherPrefab(EditorBatchedTest):
  36. from .tests.create_prefab import CreatePrefab_UnderChildEntityOfAnotherPrefab as test_module
  37. class test_CreatePrefab_WithNestedEntities(EditorBatchedTest):
  38. from .tests.create_prefab import CreatePrefab_WithNestedEntities as test_module
  39. class test_CreatePrefab_WithNestedEntitiesAndNestedPrefabs(EditorBatchedTest):
  40. from .tests.create_prefab import CreatePrefab_WithNestedEntitiesAndNestedPrefabs as test_module
  41. class test_CreatePrefab_WithSingleEntity(EditorBatchedTest):
  42. from .tests.create_prefab import CreatePrefab_WithSingleEntity as test_module
  43. # Delete Entity Tests
  44. class test_DeleteEntity_UnderAnotherPrefab(EditorBatchedTest):
  45. from .tests.delete_entity import DeleteEntity_UnderAnotherPrefab as test_module
  46. class test_DeleteEntity_UnderLevelPrefab(EditorBatchedTest):
  47. from .tests.delete_entity import DeleteEntity_UnderLevelPrefab as test_module
  48. class test_DeleteEntity_UnderNestedEntityHierarchy(EditorBatchedTest):
  49. from .tests.delete_entity import DeleteEntity_UnderNestedEntityHierarchy as test_module
  50. # Delete Prefab Tests
  51. class test_DeletePrefab_ContainingASingleEntity(EditorBatchedTest):
  52. from .tests.delete_prefab import DeletePrefab_ContainingASingleEntity as test_module
  53. class test_DeletePrefab_ContainingNestedEntitiesAndNestedPrefabs(EditorBatchedTest):
  54. from .tests.delete_prefab import DeletePrefab_ContainingNestedEntitiesAndNestedPrefabs as test_module
  55. class test_DeletePrefab_DuplicatedPrefabInstance(EditorBatchedTest):
  56. from .tests.delete_prefab import DeletePrefab_DuplicatedPrefabInstance as test_module
  57. # Detach Prefab Tests
  58. class test_DetachPrefab_UnderAnotherPrefab(EditorBatchedTest):
  59. from .tests.detach_prefab import DetachPrefab_UnderAnotherPrefab as test_module
  60. class test_DetachPrefab_WithNestedEntities(EditorBatchedTest):
  61. from .tests.detach_prefab import DetachPrefab_WithNestedEntities as test_module
  62. class test_DetachPrefab_WithSingleEntity(EditorBatchedTest):
  63. from .tests.detach_prefab import DetachPrefab_WithSingleEntity as test_module
  64. # Duplicate Prefab Tests
  65. class test_DuplicateEntity_WithNestedEntities(EditorBatchedTest):
  66. from .tests.duplicate_prefab import DuplicateEntity_WithNestedEntities as test_module
  67. class test_DuplicateEntity_WithNestedEntitiesAndNestedPrefabs(EditorBatchedTest):
  68. from .tests.duplicate_prefab import DuplicateEntity_WithNestedEntitiesAndNestedPrefabs as test_module
  69. class test_DuplicatePrefab_ContainingASingleEntity(EditorBatchedTest):
  70. from .tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module
  71. class test_DuplicatePrefab_ContainingNestedEntitiesAndNestedPrefabs(EditorBatchedTest):
  72. from .tests.duplicate_prefab import DuplicatePrefab_ContainingNestedEntitiesAndNestedPrefabs as test_module
  73. # Instantiate Prefab Tests
  74. class test_InstantiatePrefab_ContainingASingleEntity(EditorBatchedTest):
  75. from .tests.instantiate_prefab import InstantiatePrefab_ContainingASingleEntity as test_module
  76. class test_InstantiatePrefab_FromCreatedPrefabWithSingleEntity(EditorBatchedTest):
  77. from .tests.instantiate_prefab import InstantiatePrefab_FromCreatedPrefabWithSingleEntity as test_module
  78. class test_InstantiatePrefab_LevelPrefab(EditorBatchedTest):
  79. from .tests.instantiate_prefab import InstantiatePrefab_LevelPrefab as test_module
  80. class test_InstantiatePrefab_WithNestedEntities(EditorBatchedTest):
  81. from .tests.instantiate_prefab import InstantiatePrefab_WithNestedEntities as test_module
  82. class test_InstantiatePrefab_WithNestedEntitiesAndNestedPrefabs(EditorBatchedTest):
  83. from .tests.instantiate_prefab import InstantiatePrefab_WithNestedEntitiesandNestedPrefabs as test_module
  84. # Open Level Tests
  85. class test_OpenLevel_ContainingTwoEntities(EditorBatchedTest):
  86. from .tests.open_level import OpenLevel_ContainingTwoEntities as test_module
  87. # Prefab Notifications Tests
  88. class test_PrefabNotifications_PropagationNotificationsReceived(EditorBatchedTest):
  89. from .tests.prefab_notifications import PrefabNotifications_PropagationNotificationsReceived as test_module
  90. class test_PrefabNotifications_RootPrefabLoadedNotificationsReceived(EditorBatchedTest):
  91. from .tests.prefab_notifications import PrefabNotifications_RootPrefabLoadedNotificationsReceived as test_module
  92. # Reparent Prefab Tests
  93. class test_ReparentEntity_UnderEntityHierarchies(EditorBatchedTest):
  94. from .tests.reparent_prefab import ReparentEntity_UnderEntityHierarchies as test_module
  95. # Spawnables Tests
  96. class test_SC_Spawnables_DespawnOnEntityDeactivate(EditorBatchedTest):
  97. from .tests.spawnables import SC_Spawnables_DespawnOnEntityDeactivate as test_module
  98. class test_SC_Spawnables_EntityClearedOnGameModeExit(EditorBatchedTest):
  99. from .tests.spawnables import SC_Spawnables_EntityClearedOnGameModeExit as test_module
  100. class test_SC_Spawnables_MultipleSpawnsFromSingleTicket(EditorBatchedTest):
  101. from .tests.spawnables import SC_Spawnables_MultipleSpawnsFromSingleTicket as test_module
  102. class test_SC_Spawnables_NestedSpawn(EditorBatchedTest):
  103. from .tests.spawnables import SC_Spawnables_NestedSpawn as test_module
  104. class test_SC_Spawnables_SimpleSpawnAndDespawn(EditorBatchedTest):
  105. from .tests.spawnables import SC_Spawnables_SimpleSpawnAndDespawn as test_module
  106. class test_Lua_Spawnables_DespawnOnEntityDeactivate(EditorBatchedTest):
  107. from .tests.spawnables import Lua_Spawnables_DespawnOnEntityDeactivate as test_module
  108. class test_Lua_Spawnables_EntityClearedOnGameModeExit(EditorBatchedTest):
  109. from .tests.spawnables import Lua_Spawnables_EntityClearedOnGameModeExit as test_module
  110. class test_Lua_Spawnables_MultipleSpawnsFromSingleTicket(EditorBatchedTest):
  111. from .tests.spawnables import Lua_Spawnables_MultipleSpawnsFromSingleTicket as test_module
  112. class test_Lua_Spawnables_NestedSpawn(EditorBatchedTest):
  113. from .tests.spawnables import Lua_Spawnables_NestedSpawn as test_module
  114. class test_Lua_Spawnables_SimpleSpawnAndDespawn(EditorBatchedTest):
  115. from .tests.spawnables import Lua_Spawnables_SimpleSpawnAndDespawn as test_module
  116. @pytest.mark.SUITE_main
  117. @pytest.mark.parametrize("launcher_platform", ['windows_editor'])
  118. @pytest.mark.parametrize("project", ["AutomatedTesting"])
  119. class TestAutomationOverrides(EditorTestSuite):
  120. # These tests will execute with Outliner Overrides/Inspector DPE/Inspector Overrides enabled
  121. EditorTestSuite.global_extra_cmdline_args.extend(
  122. [f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableOutlinerOverrideManagement=true",
  123. f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableInspectorOverrideManagement=true",
  124. f"--regset=/O3DE/Autoexec/ConsoleCommands/ed_enableDPEInspector=true"])
  125. # Overrides Tests
  126. class test_AddEntity_UnderUnfocusedInstanceAsOverride(EditorBatchedTest):
  127. from .tests.overrides import AddEntity_UnderUnfocusedInstanceAsOverride as test_module
  128. class test_DeleteEntity_UnderImmediateInstance(EditorBatchedTest):
  129. from .tests.overrides import DeleteEntity_UnderImmediateInstance as test_module
  130. class test_DeleteEntity_UnderNestedInstance(EditorBatchedTest):
  131. from .tests.overrides import DeleteEntity_UnderNestedInstance as test_module
  132. class test_DeletePrefab_UnderImmediateInstance(EditorBatchedTest):
  133. from .tests.overrides import DeletePrefab_UnderImmediateInstance as test_module
  134. class test_DeletePrefab_UnderNestedInstance(EditorBatchedTest):
  135. from .tests.overrides import DeletePrefab_UnderNestedInstance as test_module
  136. class test_EditEntity_UnderImmediateInstance(EditorBatchedTest):
  137. from .tests.overrides import EditEntity_UnderImmediateInstance as test_module
  138. class test_EditEntity_UnderNestedInstance(EditorBatchedTest):
  139. from .tests.overrides import EditEntity_UnderNestedInstance as test_module