You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/AutomatedTesting/Gem/PythonTests
nvsickle c9fb41d0e5 Fix Entity Outliner sort order with Prefabs enabled
The EditorEntitySortComponent was relying on serialization callbacks not exposed to the JSON serializer to marshal data between its serialized state and its runtime state, which led to the outliner sort order becoming disrupted every time a prefab propagation occurs (and the component is subsequently serialized and deserialized). This change:
- Forces `PrepareSave` and `PostLoad` for `EditorEntitySortComponent` to be called at update (direct descendant added or removed) and activation time respectively while prefabs are enabled. While this could be optimized, and this logic stands to be refactored once slices are fully removed, I was unable to gather any samples in which `PrepareSave` are called in a sampling profiler in a scene with 1000 top-level entities, so I don't anticipate this introducing a meaningful performance regression in the short term.
- Disables updates in `EditorEntitySortComponent` during prefab propagation, as any detected changes do not signal authored intent at this time
- Made `GetEntityChildOrder` in `EditorEntityHelpers` work with prefabs enabled, which restores the existing "Sort: A -> Z" and "Sort: Z -> A" behaviors (which have some preexisting issues this does not fix)
- Adds a Python regression test to the Editor suite to validate this behavior - the test is currently in TestSuite_Main and not TestSuite_Main_Optimized because it requires an Editor launch with prefabs enabled, this can be fixed once AutomatedTesting is further migrated away from slices

@AMZN-daimini has a larger change that improves the JSON serialization format (https://github.com/o3de/o3de/pull/1292) which we should absolutely bring in in the future to improve the legibility of the Prefab format, but this change fixes the functionality (including saving & reloading a level and keeping a consistent order) without altering the Prefab format - this lower impact radius fix is my preference for our stabilization period.

Signed-off-by: nvsickle <nvsickle@amazon.com>
4 years ago
..
AWS Update env var setting instructions in AWS Gem test README (#4791) 4 years ago
Atom Merge pull request #4770 from aws-lumberyard-dev/Atom/scottmur/Atom-16561 4 years ago
Blast Added PAL to blast and whitebox tests to only enable automated tests on supported platforms: windows only at the moment. (#5165) 4 years ago
EditorPythonBindings Update the FileIO Aliases (#4186) 4 years ago
EditorPythonTestTools Add Detach and Duplicate Prefab basic workflow auto test (#4506) 4 years ago
NvCloth Fixes for periodic and gpu tests affected by the move 4 years ago
Physics Renamed ctest_pytest.ini to pytest.ini so it is used by default, added TestSuite_ as collection file (#4822) 4 years ago
Platform Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Prefab Add Detach and Duplicate Prefab basic workflow auto test (#4506) 4 years ago
PythonAssetBuilder {SPEC7767} Fix for PythonAssetBuilding auto tests (#3089) 4 years ago
WhiteBox Added PAL to blast and whitebox tests to only enable automated tests on supported platforms: windows only at the moment. (#5165) 4 years ago
assetpipeline Updating FBX_Tests and test asset files (#4477) 4 years ago
automatedtesting_shared Fix for PyTest editor test case names. 4 years ago
editor Fix Entity Outliner sort order with Prefabs enabled 4 years ago
editor_test_testing Renamed ctest_pytest.ini to pytest.ini so it is used by default, added TestSuite_ as collection file (#4822) 4 years ago
largeworlds Skipping GraphUpdate test due to LC node issue in Debug configuration (#4847) 4 years ago
scripting Marked test_VariableManager_UnpinVariableType_Works as xfail, the test needs to be reworked 4 years ago
smoke removing remote console smoke test 4 years ago
streaming Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
CMakeLists.txt Renamed ctest_pytest.ini to pytest.ini so it is used by default, added TestSuite_ as collection file (#4822) 4 years ago