diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTreeTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTreeTests.cs index 13c5c134..0fd056f8 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTreeTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DebugViewTreeTests.cs @@ -37,14 +37,14 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Deployment; /// /// /// -/// Why the tree assertion is robust regardless of seeded alarms — the -/// always renders its <ul role="tree"> root -/// (with an EmptyContent "No alarms." / "No attributes." slot when the -/// forest is empty), so asserting a [role="tree"] inside the active pane -/// holds whether or not the fixture instance happens to carry a configured alarm -/// or composition members. The test therefore does NOT depend on heavy alarm -/// seeding: it proves the Alarms tab switches the visible pane and that pane hosts -/// a tree, which is the structural contract of the tabs+trees rework. +/// Why the alarms-tab assertion is tolerant — the +/// renders its <ul role="tree"> root ONLY +/// when the forest is non-empty; when empty it renders the EmptyContent +/// slot ("No alarms.") with no [role="tree"] element. The seeded +/// instance has no configured alarms, so the +/// alarms pane shows the empty hint. The Attributes pane always has data (one +/// attribute is seeded), so its [role="tree"] assertion remains strict. +/// The populated alarm tree is covered by bUnit tests (DebugViewAlarmTableTests). /// /// [Collection("Playwright")] @@ -116,9 +116,18 @@ public class DebugViewTreeTests : IClassFixture await Assertions.Expect(alarmTab).ToHaveAttributeAsync("aria-selected", "true"); await Assertions.Expect(alarmPane).ToBeVisibleAsync(new() { Timeout = 10_000 }); await Assertions.Expect(attrPane).ToBeHiddenAsync(); - // The TreeView always renders its