1544587a10
- 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.
15 lines
497 B
C#
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");
|
|
}
|
|
}
|