test(ui): follow the relocated settings gear
This commit is contained in:
@@ -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("<Border ", settingsTooltip, System.StringComparison.Ordinal);
|
||||
var gearEnd = preview.IndexOf("</Border>", 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("<StackPanel Grid.Column=\"1\"", System.StringComparison.Ordinal);
|
||||
Assert.True(edit > 0 && centre > edit,
|
||||
"the EDIT toggle must appear before the centre (session) cluster");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user