[LYN-2255] Made PrefabTestFixture have the prefab system enabled so that the duplicate tests pass on Jenkins (they rely on the PrefabEditorEntityOwnershipInterface being registered).

This commit is contained in:
Chris Galvan
2021-05-20 14:28:04 -05:00
parent 8d8504aec3
commit c105894aa5
4 changed files with 36 additions and 2 deletions
@@ -20,6 +20,17 @@
namespace UnitTest
{
PrefabTestToolsApplication::PrefabTestToolsApplication(AZStd::string appName)
: ToolsTestApplication(AZStd::move(appName))
{
}
bool PrefabTestToolsApplication::IsPrefabSystemEnabled() const
{
// Make sure our prefab tests always run with prefabs enabled
return true;
}
void PrefabTestFixture::SetUpEditorFixtureImpl()
{
// Acquire the system entity
@@ -44,6 +55,11 @@ namespace UnitTest
GetApplication()->RegisterComponentDescriptor(PrefabTestComponent::CreateDescriptor());
}
AZStd::unique_ptr<ToolsTestApplication> PrefabTestFixture::CreateTestApplication()
{
return AZStd::make_unique<PrefabTestToolsApplication>("PrefabTestApplication");
}
AZ::Entity* PrefabTestFixture::CreateEntity(const char* entityName, const bool shouldActivate)
{
// Circumvent the EntityContext system and generate a new entity with a transformcomponent