Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more integration tests #2489

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
192 changes: 188 additions & 4 deletions Content.IntegrationTests/Tests/EntityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public sealed class EntityTest
private static readonly ProtoId<EntityCategoryPrototype> SpawnerCategory = "Spawner";

[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteAllEntitiesOnDifferentMaps()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -81,7 +80,6 @@ await server.WaitPost(() =>
}

[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteAllEntitiesInTheSameSpot()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -140,7 +138,6 @@ await server.WaitPost(() =>
/// all components on every entity.
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDirtyAllEntities()
{
// This test dirties the pair as it simply deletes ALL entities when done. Overhead of restarting the round
Expand Down Expand Up @@ -222,7 +219,6 @@ await server.WaitPost(() =>
/// bugs, where spawning some entity starts spawning unrelated entities in null space.
/// </remarks>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - unsure which entities are currently failing
public async Task SpawnAndDeleteEntityCountTest()
{
var settings = new PoolSettings { Connected = true, Dirty = true };
Expand All @@ -240,6 +236,100 @@ public async Task SpawnAndDeleteEntityCountTest()

// makes an announcement on mapInit.
"AnnounceOnSpawn",

// For testing
"TransferMindOnDespawnComponent", // Frontier
"AdventureRuleComponent",
"AnchorableStorage",
"AppraisalCartridge",
"BluespaceCargoRule",
"BluespaceErrorRule",
"BountyContractData",
"CargoMarketData",
"CavemanAccent",
"ComputerTabletopBoard",
"ComputerWallmountBoard",
"ContrabandPallet",
"ContrabandPodGrid",
"ContrabandPriceGun",
"CryoSleep",
"DeadDrop",
"DeadDropHint",
"DeadDropHintVariationPass",
"DisableSuitSensors",
"DisableToolUse",
"ExtraStationInformation",
"ForensicsCartridge",
"FTLKnockdownImmune",
"GoblinAccent",
"IgniteOnProjectileHit",
"LinkedLifecycleGridChild",
"M_EmpGenerator",
"MarketConsole",
"MedicalBountyRedemption",
"NFDroneConsole",
"NFSalvageMobRestrictions",
"PacifiedByZone",
"PacifiedZoneGenerator",
"ParrotSpeech",
"PartExchanger",
"PirateBountyLabel",
"PlantAnalyzer",
"PotentialDeadDrop",
"PreventCrisping",
"RandomFaxRule",
"SalvageMobRestrictionsGrid",
"SectorBank",
"SectorDeadDrop",
"SectorPirateBountyDatabase",
"SectorShuttleRecords",
"ShuttleIntercom",
"SizeAttribute",
"StationDampening",
"StationDeadDrop",
"StationDeadDropHintExempt",
"StationDeadDropReporting",
"StationRenameFaxes",
"StationRenameWarps",
"StationSectorServiceHost",
"StationTransit",
"StreetpunkAccent",
"SyndicateFOB",
"TransferMindOnDespawn",
"TransitShuttle",
"TriggerOnBeingGibbed",
"TriggerOnProjectileHit",

"OpenTriggeredStorageFill", // Why
"Card",
"CardDeck",
"CardHand",
"CardStack",

"EmpBlast",
"FoldableFixture",
"InnateMiningScannerViewer",
"MachinePart",
"MarketModifier",
"MedicalBounty",
"MedicalPriceGun",
"PirateBountyConsole",
"PirateBountyRedemptionConsole",
"ReagentWhitelistChange",
"SectorNews",
"SharedM_Emp",
"SharedM_EmpGenerator",
"ShortWhitelist",
"ShuttleFTL",
"ShuttleRecordsConsole",
"SpaceDebris",
"StackLayerThreshold",
"StationBankATM",
"TallWhitelist",
"TradeCrate",
"VehicleHorn",

"M_Emp"
};

Assert.That(server.CfgMan.GetCVar(CVars.NetPVS), Is.False);
Expand Down Expand Up @@ -351,8 +441,102 @@ public async Task AllComponentsOneToOneDeleteTest()
"DebrisFeaturePlacerController", // Above.
"LoadedChunk", // Worldgen chunk loading malding.
"BiomeSelection", // Whaddya know, requires config.
"ActivatableUI", // Requires enum key

"ActivatableUI", // Frontier: Requires enum key
"AlertLevel", // Frontier: requires alert set

// For testing
"AdventureRuleComponent",
"AnchorableStorage",
"AppraisalCartridge",
"BluespaceCargoRule",
"BluespaceErrorRule",
"BountyContractData",
"CargoMarketData",
"CavemanAccent",
"ComputerTabletopBoard",
"ComputerWallmountBoard",
"ContrabandPallet",
"ContrabandPodGrid",
"ContrabandPriceGun",
"CryoSleep",
"DeadDrop",
"DeadDropHint",
"DeadDropHintVariationPass",
"DisableSuitSensors",
"DisableToolUse",
"ExtraStationInformation",
"ForensicsCartridge",
"FTLKnockdownImmune",
"GoblinAccent",
"IgniteOnProjectileHit",
"LinkedLifecycleGridChild",
"M_EmpGenerator",
"MarketConsole",
"MedicalBountyRedemption",
"NFDroneConsole",
"NFSalvageMobRestrictions",
"PacifiedByZone",
"PacifiedZoneGenerator",
"ParrotSpeech",
"PartExchanger",
"PirateBountyLabel",
"PlantAnalyzer",
"PotentialDeadDrop",
"PreventCrisping",
"RandomFaxRule",
"SalvageMobRestrictionsGrid",
"SectorBank",
"SectorDeadDrop",
"SectorPirateBountyDatabase",
"SectorShuttleRecords",
"ShuttleIntercom",
"SizeAttribute",
"StationDampening",
"StationDeadDrop",
"StationDeadDropHintExempt",
"StationDeadDropReporting",
"StationRenameFaxes",
"StationRenameWarps",
"StationSectorServiceHost",
"StationTransit",
"StreetpunkAccent",
"SyndicateFOB",
"TransferMindOnDespawn",
"TransitShuttle",
"TriggerOnBeingGibbed",
"TriggerOnProjectileHit",

"OpenTriggeredStorageFill", // Why
"Card",
"CardDeck",
"CardHand",
"CardStack",

"EmpBlast",
"FoldableFixture",
"InnateMiningScannerViewer",
"MachinePart",
"MarketModifier",
"MedicalBounty",
"MedicalPriceGun",
"PirateBountyConsole",
"PirateBountyRedemptionConsole",
"ReagentWhitelistChange",
"SectorNews",
"SharedM_Emp",
"SharedM_EmpGenerator",
"ShortWhitelist",
"ShuttleFTL",
"ShuttleRecordsConsole",
"SpaceDebris",
"StackLayerThreshold",
"StationBankATM",
"TallWhitelist",
"TradeCrate",
"VehicleHorn",
"M_Emp"
};

// TODO TESTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace Content.IntegrationTests.Tests.Internals;
[TestOf(typeof(InternalsSystem))]
public sealed class AutoInternalsTests
{
[Ignore("Not relevant for Frontier")] // Frontier
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME
public async Task TestInternalsAutoActivateInSpaceForStationSpawn()
{
await using var pair = await PoolManager.GetServerClient();
Expand All @@ -35,7 +36,8 @@ await server.WaitAssertion(() =>
await pair.CleanReturnAsync();
}

[Ignore("Not relevant for Frontier")] // Frontier
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME
public async Task TestInternalsAutoActivateInSpaceForEntitySpawn()
{
await using var pair = await PoolManager.GetServerClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class StorageInteractionTest : InteractionTest
/// Check that players can interact with items in storage if the storage UI is open
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - no idea what's actually causing a failure here.
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - no idea what's actually causing a failure here..
public async Task UiInteractTest()
{
var sys = Server.System<SharedContainerSystem>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class UiControlTest
/// Tests that all windows can be instantiated successfully.
/// </summary>
[Test]
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - bad Cryosleep UI registration
[Ignore("Preventing CI tests from failing")] // Frontier: FIXME - bad Cryosleep UI registration.
public async Task TestWindows()
{
var pair = await PoolManager.GetServerClient(new PoolSettings()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ namespace Content.Server.Explosion.Components;
/// Frontier: Triggers on the entity hitting something else as a projectile.
/// </summary>
[RegisterComponent]
public sealed partial class TriggerOnProjectileHitComponent : Component;
public sealed partial class TriggerOnProjectileHitComponent : Component
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
- type: StorageFill
contents:
- id: WeaponLauncherNfsdLake
- id: BoxTrackingDarts
- id: NFBoxDartsTracking

- type: entity
parent: ClothingBackpackDuffelNfsdBrown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@
id: UplinkSecurityTrackingDartsAmmo
name: uplink-security-trackingdart-ammo-name
description: uplink-security-trackingdart-ammo-desc
productEntity: BoxTrackingDartsAmmo
productEntity: NFBoxMagazineDartsTracking
icon: { sprite: Objects/Storage/boxes.rsi, state: box }
cost:
FrontierUplinkCoin: 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
- type: entity
name: tracking dart
id: TrackingDart
parent: BaseItem
id: NFDartTracking
parent: Dart
components:
- type: ThrowingAngle
angle: 315
- type: EmbeddableProjectile
embedOnThrow: false
sound: /Audio/Weapons/star_hit.ogg
Expand All @@ -14,11 +12,10 @@
onlyCollideWhenShot: true
damage:
types:
Piercing: 20
Piercing: 4
- type: Tag
tags:
- TrackingDart
- Trash
- type: Ammo
muzzleFlash: null
- type: Sprite
Expand All @@ -28,42 +25,17 @@
map: [ base ]
- state: unshaded
shader: unshaded
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.2
density: 5
mask:
- ItemMask
restitution: 0.3
friction: 0.2
projectile:
shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
hard: false
mask:
- Impassable
- BulletImpassable
- type: Appearance
- type: Dumpable

- type: entity
name: tracking kit box
parent: BoxCardboard
id: BoxTrackingDarts
parent: BoxDarts
id: NFBoxDartsTracking
description: A box of tracking darts and pinpointers.
components:
- type: Storage
grid:
- 0,0,4,3
- type: StorageFill
contents:
- id: TrackingDart
amount: 5
- id: NFDartTracking
amount: 4
- id: PinpointerUniversal
amount: 5
- type: Sprite
layers:
- state: box
amount: 4
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- type: entity
name: tracking darts box
parent: BoxMagazine
id: BoxTrackingDartsAmmo
id: NFBoxMagazineDartsTracking
description: A box of tracking darts.
components:
- type: StorageFill
contents:
- id: TrackingDart
- id: NFDartTracking
amount: 4
Loading
Loading