Add more UI helper methods for tests (#15463)

This commit is contained in:
Leon Friedrich
2023-04-17 11:46:28 +12:00
committed by GitHub
parent 9f6215a759
commit 33ed34b532
3 changed files with 178 additions and 17 deletions

View File

@@ -14,6 +14,7 @@ using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using NUnit.Framework;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
@@ -91,6 +92,7 @@ public abstract partial class InteractionTest
// CLIENT dependencies
protected IEntityManager CEntMan = default!;
protected IUserInterfaceManager UiMan = default!;
protected ConstructionSystem CConSys = default!;
protected ExamineSystem ExamineSys = default!;
protected InteractionTestSystem CTestSystem = default!;
@@ -98,7 +100,6 @@ public abstract partial class InteractionTest
// player components
protected HandsComponent Hands = default!;
protected DoAfterComponent DoAfters = default!;
protected UserInterfaceSystem CUISystem = default!;
public float TickPeriod => (float)Timing.TickPeriod.TotalSeconds;
@@ -125,10 +126,10 @@ public abstract partial class InteractionTest
// client dependencies
CEntMan = Client.ResolveDependency<IEntityManager>();
UiMan = Client.ResolveDependency<IUserInterfaceManager>();
CTestSystem = CEntMan.System<InteractionTestSystem>();
CConSys = CEntMan.System<ConstructionSystem>();
ExamineSys = CEntMan.System<ExamineSystem>();
CUISystem = CEntMan.System<UserInterfaceSystem>();
// Setup map.
MapData = await PoolManager.CreateTestMap(PairTracker);