test(selftest): add PayloadHandler and ChunkRenderer ctor smoke steps

This commit is contained in:
2026-05-30 08:40:51 +02:00
parent ea549ebcd0
commit 6af9e05664
3 changed files with 126 additions and 0 deletions
+20
View File
@@ -118,6 +118,14 @@ public sealed class Plugin : IAsyncDalamudPlugin
internal Integrations.HonorificService HonorificService { get; private set; } = null!;
internal Integrations.CustomAudioPlayer CustomAudioPlayer { get; private set; } = null!;
// Ctor-smoke anchors (B0-2). Exposed so the Payload/Chunk ctor-smoke steps
// can drive the real per-frame Lender path (Borrow()) and the eager
// singletons through the container, never via new(). Mirror of the
// FontManager property pattern — every SelfTest reaches services this way.
internal PayloadHandler PayloadHandler { get; private set; } = null!;
internal Util.Lender<PayloadHandler> PayloadHandlerLender { get; private set; } = null!;
internal Ui.Components.ChunkRenderer ChunkRenderer { get; private set; } = null!;
// Platform indirection over Dalamud.Utility.Util. Wired in Phase-1 ctor so
// any service allocated in LoadAsync can read Plugin.PlatformUtil.
internal static IPlatformUtil PlatformUtil { get; private set; } = null!;
@@ -304,6 +312,16 @@ public sealed class Plugin : IAsyncDalamudPlugin
DebuggerWindow = _host.Services.GetRequiredService<DebuggerWindow>();
FirstRunWizard = _host.Services.GetRequiredService<FirstRunWizard>();
ChannelPopoutPool = _host.Services.GetRequiredService<Ui.Windows.ChannelPopoutPool>();
// Ctor-smoke anchors (B0-2). Resolved last, against the fully built
// container: every MakePayloadHandler dep (MainWindow, InputBar,
// ChunkRenderer, ...) is resolvable here, and the ChunkRenderer resolve
// below just reuses the same cached singleton. These are plain
// post-build container resolves (no new factory-lambda edge) — they add
// no DI cycle. See feedback_di_factory_callsite_cycles.
PayloadHandler = _host.Services.GetRequiredService<PayloadHandler>();
PayloadHandlerLender = _host.Services.GetRequiredService<Util.Lender<PayloadHandler>>();
ChunkRenderer = _host.Services.GetRequiredService<Ui.Components.ChunkRenderer>();
}
public async Task LoadAsync(CancellationToken cancellationToken)
@@ -340,6 +358,8 @@ public sealed class Plugin : IAsyncDalamudPlugin
new SelfTests.ThemeSwitchSelfTestStep(this),
new SelfTests.ThemeCrossfadeSelfTestStep(this),
new SelfTests.FontManagerCtorSmokeStep(this),
new SelfTests.PayloadHandlerCtorSmokeStep(this),
new SelfTests.ChunkRendererCtorSmokeStep(this),
new SelfTests.FontPushSmokeStep(this),
new SelfTests.WizardStateSmokeStep(this),
new SelfTests.FoxBannerTextureSmokeStep(this),