Files
wwdpublic/Content.IntegrationTests/Tests/Utility/SandboxTest.cs
Cinkafox 65208f0165 [Add] new ui (#497)
* - add: StyleSheetify

* - add: APC style

* - tweak: Select only APC now!

* - fix: Window positioning

* - fix: animations

* - add: Fancy chat

* - tweak: change some margin think

* - fix: add assemblies of stylesheetify for packaging

* - tweak: update StyleSheetify

* - add: custom LauncherConnection

* - tweak: change to paper

* - tweak: Update StyleSheetify

* - add: fancy lobby screen

* - tweak: some beauty think in lobby screen

* - add: new icons

* - tweak: change icons

* - tweak: //WWDP EDIT

* - fix: disable style while testing

* - fix: Channel Popup button style revert

* - fix: test again

* - tweak: Update StyleSheetify
2025-05-17 14:30:12 +03: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,
typeof(StyleSheetify.Shared.StylePrototypeIgnorance).Assembly,
},
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);
}
}