using AcDream.App.UI.Layout; using DatReaderWriter; namespace AcDream.App.Tests.UI.Layout; /// /// CA5 re-check pin (2026-08-24): the popup skins' shared TEXT CHILD /// (0x10000396) authors P0x3D=256 — the wrap width retail's /// InqSizewMargins UITS_MAX_WIDTH reads BEFORE its display-width /// fallback. TS-85's earlier "zero elements author P0x3D" sweep covered /// hover TARGETS only, never the popup skins; this pin closes that gap so /// a DAT revision (or importer regression) that loses the bound fails /// loudly instead of silently un-wrapping every tooltip. /// [Trait("Lane", "InstalledDat")] public sealed class TooltipSkinLiveDatTests { private static string DatDirectory => Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Documents", "Asheron's Call"); [InstalledDatFact] public void EveryPopupSkinTextChildAuthorsTheRetailWrapBound() { using var dats = new DatCollection( DatDirectory, DatReaderWriter.Options.DatAccessType.Read); ElementInfo? tree = LayoutImporter.ImportInfos(dats, 0x21000041u); Assert.NotNull(tree); int textChildren = 0; void Walk(ElementInfo e) { if (e.Id == 0x10000396u && e.Type == 12) { textChildren++; Assert.Equal(256, e.MaxWidth); } foreach (var c in e.Children) Walk(c); } Walk(tree!); Assert.True(textChildren >= 4, $"expected the text child under all four popup skins, found {textChildren}"); } }