Fix unit test

Signed-off-by: rhhong <rhhong@amazon.com>
This commit is contained in:
rhhong
2021-08-24 11:36:13 -07:00
parent 5369df4195
commit 4767d2a891
31 changed files with 341 additions and 232 deletions
@@ -22,6 +22,7 @@
#include <Editor/Plugins/SimulatedObject/SimulatedObjectWidget.h>
#include <Tests/TestAssetCode/SimpleActors.h>
#include <Tests/TestAssetCode/ActorFactory.h>
#include <Tests/TestAssetCode/TestActorAssets.h>
#include <Tests/UI/ModalPopupHandler.h>
#include <Tests/UI/UIFixture.h>
@@ -37,9 +38,10 @@ namespace EMotionFX
{
RecordProperty("test_case_id", "C14519563");
AutoRegisteredActor actor = ActorFactory::CreateAndInit<SimpleJointChainActor>(7, "CanAddToSimulatedObjectActor");
ActorInstance* actorInstance = ActorInstance::Create(actor.get());
AZ::Data::AssetId actorAssetId("{5060227D-B6F4-422E-BF82-41AAC5F228A5}");
AZ::Data::Asset<Integration::ActorAsset> actorAsset =
TestActorAssets::CreateActorAssetAndRegister<SimpleJointChainActor>(actorAssetId, 7, "CanAddToSimulatedObjectActor");
ActorInstance* actorInstance = ActorInstance::Create(actorAsset->GetActor());
// Change the Editor mode to Simulated Objects
EMStudio::GetMainWindow()->ApplicationModeChanged("SimulatedObjects");