Code Cleanup: Integration Tests (#29584)

* Cleanup PuddleTest

* Cleanup GravityGridTest

* Cleanup PowerTest

* Cleanup SaveLoadMapTest

* Cleanup Body tests

* Cleanup ContainerOcclusionTest

* Cleanup AirlockTest

* Cleanup DamageableTest

* Cleanup EntityTest

* Cleanup FluidSpillTest

* Cleanup FollowerSystemTest

* Cleanup HandCuffTest

* Cleanup InteractionSystemTests

* Cleanup InRangeUnobstructed

* Cleanup SimplePredictReconcileTest

* Cleanup PostMapInitTest

* Cleanup SalvageTest

* Cleanup SaveLoadSaveTest

* Cleanup ShuttleTest

* Cleanup MaterialArbitrageTest

* Cleanup PrototypeSaveTest

* Fix ShuttleTest

* Bunch of small ones

* Move JobTests to Station directory

* More small fixes

* Cleanup InteractionTest.Helpers
Had to change a method signature, so some callers were modified too.

* Missed one
This commit is contained in:
Tayrtahn
2024-07-02 20:01:37 -04:00
committed by GitHub
parent 58d46ddd46
commit cfc0247e5c
56 changed files with 510 additions and 491 deletions

View File

@@ -5,7 +5,6 @@ using Content.Shared.Body.Part;
using Content.Shared.Rotation;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Maths;
namespace Content.IntegrationTests.Tests.Body
{
@@ -40,13 +39,14 @@ namespace Content.IntegrationTests.Tests.Body
var appearanceSystem = entityManager.System<SharedAppearanceSystem>();
var xformSystem = entityManager.System<SharedTransformSystem>();
var map = await pair.CreateTestMap();
await server.WaitAssertion(() =>
{
var mapId = mapManager.CreateMap();
BodyComponent body = null;
human = entityManager.SpawnEntity("HumanBodyAndAppearanceDummy",
new MapCoordinates(Vector2.Zero, mapId));
new MapCoordinates(Vector2.Zero, map.MapId));
Assert.Multiple(() =>
{
@@ -61,7 +61,7 @@ namespace Content.IntegrationTests.Tests.Body
foreach (var leg in legs)
{
xformSystem.DetachParentToNull(leg.Id, entityManager.GetComponent<TransformComponent>(leg.Id));
xformSystem.DetachEntity(leg.Id, entityManager.GetComponent<TransformComponent>(leg.Id));
}
});