feat: add ThemeSwitchSelfTestStep + ISelfTestRegistry wiring

Registers a single SelfTestStep that exercises Plugin.ThemeRegistry.Switch
through the live theme list. Verified in-game via /xldev SelfTest tab on
2026-05-08; Plugin loads cleanly with the RegisterTestSteps call and the
step runs the theme cycle as expected.

Folder is HellionChat/SelfTest/ (singular). Future steps may rename to
SelfTests/ to match the local Plan v4 convention.
This commit is contained in:
2026-05-08 08:21:21 +02:00
parent 1c354d18bb
commit cb327b8073
2 changed files with 92 additions and 0 deletions
+7
View File
@@ -41,6 +41,7 @@ public sealed class Plugin : IDalamudPlugin
[PluginService] public static IAddonLifecycle AddonLifecycle { get; private set; } = null!;
[PluginService] public static IPlayerState PlayerState { get; private set; } = null!;
[PluginService] public static ISeStringEvaluator Evaluator { get; private set; } = null!;
[PluginService] public static ISelfTestRegistry SelfTestRegistry { get; private set; } = null!;
public static Configuration Config = null!;
public static FileDialogManager FileDialogManager { get; private set; } = null!;
@@ -452,6 +453,12 @@ public sealed class Plugin : IDalamudPlugin
ThemeRegistry = new Themes.ThemeRegistry(customThemesDir);
ThemeRegistry.Switch(Config.Theme);
// SelfTest hooks live alongside the live registry — the steps
// poll Active per frame and need the registry already wired.
SelfTestRegistry.RegisterTestSteps([
new SelfTest.ThemeSwitchSelfTestStep(this),
]);
// Plugin integrations register their IPC subscribers up-front so
// Ready/Disposing events from the target plugins are caught from
// the very first frame, even if the user's Honorific reloads