test(editor): cover reparent selection undo state
This commit is contained in:
parent
9c7c0a1798
commit
fcffd651f4
@ -406,12 +406,15 @@ void MetaCoreTestHierarchyEditingCommandsDirtyAndUndo() {
|
||||
editorContext.SelectOnly(*createdId);
|
||||
MetaCoreExpect(sceneEditingService->ReparentSelection(editorContext, *parentId), "ReparentSelection command should reparent selected object");
|
||||
MetaCoreExpect(scene.FindGameObject(*createdId).GetParentId() == *parentId, "ReparentSelection should set parent id");
|
||||
MetaCoreExpect(editorContext.GetActiveObjectId() == *createdId, "ReparentSelection should keep moved object selected");
|
||||
MetaCoreExpect(scenePersistenceService->IsSceneDirty(), "ReparentSelection command should mark scene dirty");
|
||||
MetaCoreExpect(editorContext.UndoCommand(), "Undo ReparentSelection should succeed");
|
||||
MetaCoreExpect(scene.FindGameObject(*createdId).GetParentId() == 0, "Undo ReparentSelection should restore root parent");
|
||||
MetaCoreExpect(editorContext.GetActiveObjectId() == *createdId, "Undo ReparentSelection should restore moved object selection");
|
||||
MetaCoreExpect(!scenePersistenceService->IsSceneDirty(), "Undo ReparentSelection should restore clean baseline");
|
||||
MetaCoreExpect(editorContext.RedoCommand(), "Redo ReparentSelection should succeed");
|
||||
MetaCoreExpect(scene.FindGameObject(*createdId).GetParentId() == *parentId, "Redo ReparentSelection should restore parent id");
|
||||
MetaCoreExpect(editorContext.GetActiveObjectId() == *createdId, "Redo ReparentSelection should restore moved object selection");
|
||||
|
||||
MetaCoreExpect(scenePersistenceService->SaveCurrentScene(editorContext), "Hierarchy command scene should save after reparent");
|
||||
editorContext.SelectOnly(*createdId);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user