Complete management API and CLI command parity

This commit is contained in:
Joseph Doherty
2026-09-10 00:51:45 -04:00
parent 477e2abe97
commit 2750bd2809
38 changed files with 1637 additions and 199 deletions
@@ -1,3 +1,4 @@
using Microsoft.JSInterop;
using System.Security.Claims;
using ZB.MOM.WW.ScadaBridge.Security;
using Bunit;
@@ -20,6 +21,13 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.Tests;
/// </summary>
public class DataConnectionsPageTests : BunitContext
{
[Fact]
public void StorageSaveFixture_CompletesInvocationImmediately()
{
var invocation = JSInterop.JSRuntime.InvokeVoidAsync("treeviewStorage.save", "fixture-probe", "[]");
Assert.True(invocation.IsCompletedSuccessfully, "The storage-save fixture must complete JS calls before component disposal.");
}
private readonly ISiteRepository _siteRepo = Substitute.For<ISiteRepository>();
// M9-T25: the design page now injects IConnectionHealthQueryService to render
// per-connection live health badges. A substitute defaulting to an empty map
@@ -51,7 +59,7 @@ public class DataConnectionsPageTests : BunitContext
new Dictionary<int, ConnectionHealth>()));
JSInterop.Setup<string?>("treeviewStorage.load", _ => true).SetResult(null);
JSInterop.SetupVoid("treeviewStorage.save", _ => true);
JSInterop.SetupVoid("treeviewStorage.save", _ => true).SetVoidResult();
}
private void AddTestAuth()