Files
wwdpublic/Content.IntegrationTests/Tests/Utility/SandboxTest.cs
Cinkafox b2d255cdd2 [tweak] UI Tweaks (#1001)
* - tweak: update StyleSheetify

* - add: flexbox

* - fix: size of flexbox in launchergui

* - tweak: Profile editor: start.

* - add: categories

* - tweak: help me please with this shi... loadouts

* - fix: container path think

* - tweak: thinks for optimisation

* - add: group selection for loadoutpicker

* - tweak: change position of preview

* - add: reason text

* - fix: Кролькины фиксы

* - fix: кролькины фиксы ч.2

* - fix: кролькины фиксы ч.3

* - кролькины фиксы - финал

* - fix: Ворчливого дедушкины фиксы, удаление старого барахла и пометка wwdp

* - tweak: some ui change for LoadoutCategories and LoadoutEntry

* - ворчливый дед фиксы ч.2

* - fix: очередные кролькины фиксы

* - add: loadout prototype validation

* - fix: description read from edit field
2026-01-04 23:33:01 +02:00

60 lines
2.4 KiB
C#

using Content.Client.IoC;
using Content.Client.Parallax.Managers;
using Content.Client.Stylesheets;
using Robust.Client;
using Robust.Shared.Configuration;
using Robust.Shared.ContentPack;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.UnitTesting;
namespace Content.IntegrationTests.Tests.Utility;
public sealed class SandboxTest
{
[Test]
public async Task Test()
{
// Not using PoolManager.GetServerClient() because we want to avoid having to unnecessarily create & destroy a
// server. This all becomes unnecessary if ever the test becomes non-destructive or the no-server option
// actually creates a pair without a server.
var logHandler = new PoolTestLogHandler("CLIENT");
logHandler.ActivateContext(TestContext.Out);
var options = new RobustIntegrationTest.ClientIntegrationOptions
{
ContentStart = true,
OverrideLogHandler = () => logHandler,
ContentAssemblies = new[]
{
typeof(Shared.Entry.EntryPoint).Assembly,
typeof(Client.Entry.EntryPoint).Assembly,
typeof(StyleSheetify.Client.EntryPoint).Assembly, // WWDP EDIT
typeof(StyleSheetify.Shared.Dynamic.DynamicValue).Assembly, // WWDP EDIT
},
Options = new GameControllerOptions { LoadConfigAndUserData = false }
};
options.BeforeStart += () =>
{
IoCManager.Resolve<IModLoader>().SetModuleBaseCallbacks(new ClientModuleTestingCallbacks
{
ClientBeforeIoC = () =>
{
IoCManager.Register<IParallaxManager, DummyParallaxManager>(true);
IoCManager.Register<IStylesheetManager, DummyStylesheetManager>(true); //WWDP EDIT
IoCManager.Resolve<ILogManager>().GetSawmill("loc").Level = LogLevel.Error;
IoCManager.Resolve<IConfigurationManager>()
.OnValueChanged(RTCVars.FailureLogLevel, value => logHandler.FailureLevel = value, true);
}
});
};
using var client = new RobustIntegrationTest.ClientIntegrationInstance(options);
await client.WaitIdleAsync();
await client.CheckSandboxed(typeof(Client.Entry.EntryPoint).Assembly);
await client.CheckSandboxed(typeof(Shared.IoC.SharedContentIoC).Assembly);
}
}