From bd4b49f810062631ae6ad32e3ca1da6177fd6b7c Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 22 Jun 2026 21:52:54 +0200 Subject: [PATCH] =?UTF-8?q?test(D.2b):=20probe=20=E2=80=94=20paperdoll=20e?= =?UTF-8?q?quip=20slots=20resolve=20to=20UiItemList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit De-risk gate for Sub-phase C: verifies that the gmPaperDollUI subtree imported under the inventory frame (0x21000023) materialises a representative set of 6 equip-slot element ids as UiItemList widgets, confirming the controller-binding plan can proceed without an importer pre-fix. Co-Authored-By: Claude Sonnet 4.6 --- .../UI/Layout/InventoryFrameImportProbe.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/AcDream.App.Tests/UI/Layout/InventoryFrameImportProbe.cs b/tests/AcDream.App.Tests/UI/Layout/InventoryFrameImportProbe.cs index bc4acf60..57269580 100644 --- a/tests/AcDream.App.Tests/UI/Layout/InventoryFrameImportProbe.cs +++ b/tests/AcDream.App.Tests/UI/Layout/InventoryFrameImportProbe.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using AcDream.App.UI; using AcDream.App.UI.Layout; using DatReaderWriter; using DatReaderWriter.Options; @@ -34,6 +35,26 @@ public class InventoryFrameImportProbe return Directory.Exists(d) ? d : null; } + [Fact] + public void Paperdoll_equip_slots_resolve_to_item_lists() + { + var datDir = DatDir(); + if (datDir is null) return; // CI: no live dat — skip + + using var dats = new DatCollection(datDir, DatAccessType.Read); + var layout = LayoutImporter.Import(dats, Frame, _ => (0u, 0, 0), null); + Assert.NotNull(layout); + + // A representative spread across the slot grid (head, shield, the weapon composite, cloak, + // trinket, a finger). All inherit base 0x100001E4 → 0x2100003D (Type 0x10000031 = UIElement_ItemList). + foreach (uint id in new[] { 0x100005ABu, 0x100001E1u, 0x100001DFu, 0x100005E9u, 0x1000058Eu, 0x100001DCu }) + { + var el = layout!.FindElement(id); + Assert.True(el is UiItemList, + $"equip slot 0x{id:X8} resolved to {el?.GetType().Name ?? "null"}, expected UiItemList"); + } + } + [Fact] public void Mounted_panels_sit_in_front_of_the_backdrop() {