fix(ui): fellowship checkbox count, row-text + ListBox Flush doc corrections, promote probe findings to assertions
Mechanism SHOULD-FIX 4: SocialFellowshipPageController's class doc said 0x1000026B holds "all three visible option checkboxes" — the fixture and the decomp both authors FOUR (Ignore Fellowship Requests / Auto-Accept Requests / Share XP / Share Loot, 0x10000270-0x10000273). Corrected. Mechanism SHOULD-FIX 9: SocialPanelRowText.FindDeepest's doc promised "the deepest UiText descendant" but the implementation returns the LAST match in pre-order traversal order, which only equals the deepest when the subtree is a single chain. Both real row templates ARE single chains today, so behavior is unaffected — the doc now describes what the code actually does instead of a stronger guarantee it doesn't implement. Blast SHOULD-FIX 5: UiTemplateListBox.Flush()'s doc only mentioned the ContentHeight reset; UiScrollablePanel.ClearContent() also resets scroll position to 0, which the sibling UiItemList.Flush() (same method name, different semantics) does NOT do. Documented explicitly, including the UX cost this creates for a scrolled-in Friends/Squelch roster once its scrollbar is wired (this fix round's blast MF-1) — flagged for whoever revisits Friends/Squelch scrolling next rather than silently fixed as an unasked behavior change. Mechanism SHOULD-FIX 3: SocialPanelLiveMountProbeTests printed two headline findings (the 0x10000492-authored-twice count, page exclusivity after ActivateTabBehavior) without ever asserting them — a future importer regression collapsing/dropping an instance, or breaking exclusivity, could not fail this test. Both are now real assertions (Assert.Equal(2, passupCount); exactly one page Visible and it is Allegiance). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
35c40a9b56
commit
ae77270939
4 changed files with 56 additions and 6 deletions
|
|
@ -67,6 +67,11 @@ public sealed class SocialPanelLiveMountProbeTests
|
|||
tabs.ActivateTabBehavior();
|
||||
Assert.Empty(tabs.UnresolvedEntries);
|
||||
|
||||
// Fix-round mechanism SF-3: page exclusivity was activated but never
|
||||
// asserted — the #372 class ("the panel mounts but the pages are
|
||||
// wrong/blank") deserves a real assertion, not just a hope.
|
||||
bool sawVisiblePage = false;
|
||||
string? visiblePageName = null;
|
||||
foreach ((uint pageId, string name) in new[]
|
||||
{
|
||||
(0x10000513u, "Friends"),
|
||||
|
|
@ -77,9 +82,20 @@ public sealed class SocialPanelLiveMountProbeTests
|
|||
{
|
||||
UiElement? page = UiElement.FindDescendant(tabs, pageId);
|
||||
Console.WriteLine(
|
||||
$"[socialprobe] page {name} 0x{pageId:X8} -> {(page is null ? "MISSING" : page.GetType().Name)}");
|
||||
$"[socialprobe] page {name} 0x{pageId:X8} -> {(page is null ? "MISSING" : page.GetType().Name)} "
|
||||
+ $"Visible={page?.Visible}");
|
||||
Assert.NotNull(page);
|
||||
if (page!.Visible)
|
||||
{
|
||||
Assert.False(
|
||||
sawVisiblePage,
|
||||
$"page exclusivity violated: both '{visiblePageName}' and '{name}' report Visible=true after ActivateTabBehavior()");
|
||||
sawVisiblePage = true;
|
||||
visiblePageName = name;
|
||||
}
|
||||
}
|
||||
Assert.True(sawVisiblePage, "no page reports Visible=true after ActivateTabBehavior()");
|
||||
Assert.Equal("Allegiance", visiblePageName);
|
||||
|
||||
// Fellowship empty/full frame pair.
|
||||
foreach ((uint id, string name) in new[]
|
||||
|
|
@ -116,6 +132,10 @@ public sealed class SocialPanelLiveMountProbeTests
|
|||
Assert.NotNull(allegiancePage);
|
||||
int passupCount = CountDescendants(allegiancePage!, 0x10000492u);
|
||||
Console.WriteLine($"[socialprobe] 0x10000492 occurrences under allegiance page = {passupCount}");
|
||||
// Fix-round mechanism SF-3: this was printed but never asserted — a
|
||||
// future importer change that collapses or drops one instance must
|
||||
// fail this test, not just the log.
|
||||
Assert.Equal(2, passupCount);
|
||||
|
||||
// Tab button captions — non-empty (the #375 resolver class: a missing
|
||||
// string resolver renders blank captions even though the layout mounts).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue