Files
ThreadPilot/Tests/ThreadPilot.Core.Tests/TestUiStateIsolation.cs
T
PrimeBuild-pc 1544587a10 feat: remember layout choices; Windows 11 toggles in Tweaks
- The navigation pane, window size/position/maximized state, and the
  process list filters, sort and columns now survive a restart. They live
  in ui-state.json, apart from settings.json, so they never mark the
  Settings page as unsaved or travel in exported configurations. A corrupt
  file falls back to defaults; tests write to a temp file.
- Fixes the pane re-opening on every start (it was hard-coded open).
- Tweaks use a native-looking Windows 11 switch (40x20 track, sliding
  thumb) with On/Off written beside it.
- New test: every on/off setting survives save and reload.
2026-10-14 19:01:47 +02:00

15 lines
497 B
C#

namespace ThreadPilot.Core.Tests
{
using System.IO;
using System.Runtime.CompilerServices;
using ThreadPilot.Services;
internal static class TestUiStateIsolation
{
// View models read and write UI layout state; keep tests away from the real user's file.
[ModuleInitializer]
internal static void Initialize() =>
UiStateStore.FilePath = Path.Combine(Path.GetTempPath(), $"threadpilot-tests-{Environment.ProcessId}", "ui-state.json");
}
}