From e6a7147dc3b9088b6fa05dc0496f615423254cc1 Mon Sep 17 00:00:00 2001 From: gramps Date: Mon, 2 Nov 2026 11:31:49 -0800 Subject: [PATCH] test(ui): follow the relocated settings gear --- HANDOFF.md | 14 ++++++++------ ytLive.Tests/UiShellTests.cs | 20 ++++++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/HANDOFF.md b/HANDOFF.md index f8bf2cc..84720c3 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -13,20 +13,22 @@ `82609a5`. - `NotificationServiceTests` runs tint assertions with real theme resources and uses the current `Brush.ErrorContainer` token; committed as `caf91e6`. -- `ScoreboardSimulationTests` now checks the shared `Helpers/DevBuild.cs` compile-time gate; focused - test passes. This task is ready to commit. -- Clean app build is 0 warnings. Full suite: 4 failed / 518 passed of 522; remaining failures are +- `ScoreboardSimulationTests` now checks the shared `Helpers/DevBuild.cs` compile-time gate; + committed as `0e1f948`. +- `UiShellTests` now checks the orange Settings gear on the preview rail and the EDIT/session + ordering in the top bar; focused test passes. This task is ready to commit. +- Clean app build is 0 warnings. Full suite: 3 failed / 519 passed of 522; remaining failures are being handled one task and one local commit at a time. ## Next action -Commit the scoreboard-simulation guard update, then take the next remaining failure. Do not push -absent a milestone/checkpoint request. +Commit the UiShell assertion update, then take the next remaining failure. Do not push absent a +milestone/checkpoint request. ## Landmines - Build/test with Windows `dotnet.exe`; the full suite can hang in WASAPI teardown. -- `verify.sh` cannot pass until the remaining 4 suite failures are resolved; scope checks are run +- `verify.sh` cannot pass until the remaining 3 suite failures are resolved; scope checks are run separately when that gate exits early. - Any integration test constructing `MainWindow` must set `LayoutPathOverride` to a temporary DB and clear it in `finally`. diff --git a/ytLive.Tests/UiShellTests.cs b/ytLive.Tests/UiShellTests.cs index 668692a..f82efc1 100644 --- a/ytLive.Tests/UiShellTests.cs +++ b/ytLive.Tests/UiShellTests.cs @@ -75,17 +75,25 @@ public class UiShellTests } [Fact] - public void Edit_sits_beside_the_orange_gear() + public void Settings_gear_is_orange_on_the_preview_rail_and_EDIT_precedes_the_session_cluster() { var topBar = SourceAssert.Text("Controls", "TopBar.xaml"); + var preview = SourceAssert.Text("Controls", "PreviewPane.xaml"); - // The gear is a LlamaCasty control, so it wears the app's orange (not a muted icon grey). - Assert.Contains("Fill=\"{StaticResource Brush.Attention}\" Width=\"18\" Height=\"18\"", topBar); + // The settings gear moved from the top bar to the first orange preview-rail tab. + var settingsTooltip = preview.IndexOf("ToolTip=\"Settings\"", System.StringComparison.Ordinal); + Assert.True(settingsTooltip >= 0, "the Settings gear tab is missing from the preview rail"); + var gearStart = preview.LastIndexOf("", settingsTooltip, System.StringComparison.Ordinal); + Assert.True(gearStart >= 0 && gearEnd > settingsTooltip, "the Settings tab has no bordered gear surface"); + var gear = preview[gearStart..gearEnd]; + Assert.Contains("Background=\"{StaticResource Brush.Attention}\"", gear); + Assert.Contains("MouseLeftButtonUp=\"SettingsTab_Click\"", gear); + Assert.DoesNotContain("ToolTip=\"Settings\"", topBar); - // EDIT lives in the LEFT cluster, immediately after the gear — not in the centre session - // cluster (creator ruling 2026-10-30). + // EDIT stays in the left brand cluster, before the centre session cluster. var edit = topBar.IndexOf("EditingActive", System.StringComparison.Ordinal); - var centre = topBar.IndexOf("Grid.Column=\"1\"", System.StringComparison.Ordinal); + var centre = topBar.IndexOf(" 0 && centre > edit, "the EDIT toggle must appear before the centre (session) cluster"); }