Add reagent dispenser BUI test (#15443)

This commit is contained in:
Leon Friedrich
2023-04-17 04:34:36 +12:00
committed by GitHub
parent 6e0022d30f
commit a1f103d1e7
4 changed files with 181 additions and 20 deletions

View File

@@ -13,6 +13,7 @@ using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using NUnit.Framework;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
@@ -97,11 +98,12 @@ 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;
[SetUp]
public async Task Setup()
public virtual async Task Setup()
{
PairTracker = await PoolManager.GetServerClient(new PoolSettings());
@@ -126,6 +128,7 @@ public abstract partial class InteractionTest
CTestSystem = CEntMan.System<InteractionTestSystem>();
CConSys = CEntMan.System<ConstructionSystem>();
ExamineSys = CEntMan.System<ExamineSystem>();
CUISystem = CEntMan.System<UserInterfaceSystem>();
// Setup map.
MapData = await PoolManager.CreateTestMap(PairTracker);
@@ -189,7 +192,7 @@ public abstract partial class InteractionTest
}
[TearDown]
public async Task Cleanup()
public virtual async Task Cleanup()
{
await Server.WaitPost(() => MapMan.DeleteMap(MapId));
await PairTracker.CleanReturnAsync();