Complete management API and CLI command parity
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user