From ef86a2db288391d154db6a48f8879b2f8c025971 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 17 Jun 2026 15:30:18 -0400 Subject: [PATCH] =?UTF-8?q?refactor(debugview):=20cosmetic=20polish=20?= =?UTF-8?q?=E2=80=94=20test-seam=20comment,=20default-arm=20comment,=20tig?= =?UTF-8?q?hten=20severity=20assertion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Pages/Deployment/DebugView.razor | 10 ++++------ .../Deployment/DebugViewAlarmTableTests.cs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Deployment/DebugView.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Deployment/DebugView.razor index 71e7625c..bd57adcd 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Deployment/DebugView.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Deployment/DebugView.razor @@ -306,12 +306,9 @@ private TreeView? _attrTree; private TreeView? _alarmTree; - /// - /// Current-status enumeration of the live attribute dictionary. Read only on - /// the render thread (CentralUI-021) — see . - /// The trees render from ; this ordered view is - /// the single render-thread reader of the raw dictionary. - /// + // Retained as a named enumeration target for DebugViewStreamRaceTests (reflection-based); + // not consumed in the Blazor markup — the trees render from AttributeForest/AlarmForest. + // Still enumerates the live _attributeValues dict on the render thread (CentralUI-021). private IReadOnlyList FilteredAttributeValues => string.IsNullOrWhiteSpace(_attrFilter) ? _attributeValues.Values.OrderBy(a => a.AttributeName).ToList() @@ -565,6 +562,7 @@ _alarmStates[al.AlarmName] = al; break; default: + // Unknown event type — no re-render needed. return; } StateHasChanged(); diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Deployment/DebugViewAlarmTableTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Deployment/DebugViewAlarmTableTests.cs index a09b8181..82a5a243 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Deployment/DebugViewAlarmTableTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Deployment/DebugViewAlarmTableTests.cs @@ -202,7 +202,7 @@ public class DebugViewAlarmTableTests : BunitContext var leaf = binding.QuerySelector("ul[role='group'] li[role='treeitem']"); Assert.NotNull(leaf); var leafMarkup = leaf!.OuterHtml; - Assert.Contains("800", leafMarkup); // severity surfaced + Assert.Contains("sev 800", leafMarkup); // severity surfaced Assert.Contains("Shelved", leafMarkup); // composite condition badge Assert.Contains("OPC UA", leafMarkup); // native kind badge Assert.Contains("Unacked", leafMarkup); // active + unacknowledged