feat(uns): equipment is a tree leaf linking to the detail page; drop EquipmentModal

This commit is contained in:
Joseph Doherty
2026-06-11 15:01:10 -04:00
parent 773c073d0e
commit 826ffdc1a0
6 changed files with 26 additions and 547 deletions
@@ -68,7 +68,7 @@ public sealed class UnsTreeAssemblyTests
}
[Fact]
public void Build_sets_equipment_child_count_and_lazy_flag()
public void Build_sets_equipment_child_count_and_leaf_flag()
{
var clusters = new[] { new ClusterRow("c1", "zb", "SiteA", "Alpha") };
var areas = new[] { new AreaRow("a1", "c1", "AreaOne") };
@@ -82,9 +82,12 @@ public sealed class UnsTreeAssemblyTests
var tree = UnsTreeAssembly.Build(clusters, areas, lines, equipment);
var line = tree.Single().Children.Single().Children.Single().Children.Single();
// Equipment is a tree leaf that links to its own detail page, so it never carries an
// expander — HasLazyChildren is always false regardless of its tag/virtual-tag count.
// The ChildCount badge still reflects tags + virtual tags.
var withChildren = line.Children.Single(e => e.Key == "eq:e1");
withChildren.ChildCount.ShouldBe(3);
withChildren.HasLazyChildren.ShouldBeTrue();
withChildren.HasLazyChildren.ShouldBeFalse();
var empty = line.Children.Single(e => e.Key == "eq:e2");
empty.ChildCount.ShouldBe(0);