test(selftest): remove dead ConfigMigrationV21 step superseded by V22
This commit is contained in:
@@ -1,63 +0,0 @@
|
|||||||
using Dalamud.Bindings.ImGui;
|
|
||||||
using Dalamud.Plugin.SelfTest;
|
|
||||||
|
|
||||||
namespace HellionChat.SelfTests;
|
|
||||||
|
|
||||||
// Pins the post-migration shape of the v21 config. The plugin schema
|
|
||||||
// gate stamps Config.Version = 21 right after load, so by the time
|
|
||||||
// /xlperf reaches this step the migration must already be complete
|
|
||||||
// and the five v21 fields must carry their declared defaults on a
|
|
||||||
// fresh install (or the saved values on an existing one). The probe
|
|
||||||
// only verifies the version stamp and the field types — it does not
|
|
||||||
// rewrite the user's config.
|
|
||||||
internal sealed class ConfigMigrationV21Step : ISelfTestStep
|
|
||||||
{
|
|
||||||
public ConfigMigrationV21Step(Plugin plugin)
|
|
||||||
{
|
|
||||||
_ = plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Name => "Hellion Chat - Config v21 migration";
|
|
||||||
|
|
||||||
public SelfTestStepResult RunStep()
|
|
||||||
{
|
|
||||||
if (Plugin.Config.Version != 21)
|
|
||||||
{
|
|
||||||
ImGui.Text($"Config.Version is {Plugin.Config.Version}, expected 21");
|
|
||||||
return SelfTestStepResult.Fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Plugin.Config.MaxParallelPopouts <= 0)
|
|
||||||
{
|
|
||||||
ImGui.Text(
|
|
||||||
$"Config.MaxParallelPopouts is {Plugin.Config.MaxParallelPopouts}, must be > 0"
|
|
||||||
);
|
|
||||||
return SelfTestStepResult.Fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Plugin.Config.SidebarAutoSwitchThresholdPx <= 0)
|
|
||||||
{
|
|
||||||
ImGui.Text(
|
|
||||||
$"Config.SidebarAutoSwitchThresholdPx is {Plugin.Config.SidebarAutoSwitchThresholdPx}, must be > 0"
|
|
||||||
);
|
|
||||||
return SelfTestStepResult.Fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Enum.IsDefined(Plugin.Config.TellAutoOpenMode))
|
|
||||||
{
|
|
||||||
ImGui.Text($"Config.TellAutoOpenMode {Plugin.Config.TellAutoOpenMode} is out of range");
|
|
||||||
return SelfTestStepResult.Fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MainWindowOpen and SettingsWindowOpen are bool — declaration alone
|
|
||||||
// proves the migration emitted them with defaults; reading them
|
|
||||||
// here is just a touch-test that the property is reachable.
|
|
||||||
_ = Plugin.Config.MainWindowOpen;
|
|
||||||
_ = Plugin.Config.SettingsWindowOpen;
|
|
||||||
_ = Plugin.Config.ScreenshotMode;
|
|
||||||
|
|
||||||
return SelfTestStepResult.Pass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CleanUp() { }
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user