Add interaction tests (#15251)

This commit is contained in:
Leon Friedrich
2023-04-15 07:41:25 +12:00
committed by GitHub
parent ffe946729f
commit 489660a6bb
36 changed files with 2354 additions and 32 deletions

View File

@@ -0,0 +1,25 @@
using System.Threading.Tasks;
using Content.IntegrationTests.Tests.Interaction;
using Content.Shared.Placeable;
using NUnit.Framework;
namespace Content.IntegrationTests.Tests.Construction.Interaction;
public sealed class PlaceableDeconstruction : InteractionTest
{
/// <summary>
/// Checks that you can deconstruct placeable surfaces (i.e., placing a wrench on a table does not take priority).
/// </summary>
[Test]
public async Task DeconstructTable()
{
await StartDeconstruction("Table");
Assert.That(Comp<PlaceableSurfaceComponent>().IsPlaceable);
await Interact(Wrench);
AssertPrototype("TableFrame");
await Interact(Wrench);
AssertDeleted();
await AssertEntityLookup((Steel, 1), (Rod, 2));
}
}