feat(adminui): wire Galaxy live-browse picker into the standard TagModal

This commit is contained in:
Joseph Doherty
2026-06-12 22:09:22 -04:00
parent 056bfbda1b
commit 0945f19a50
5 changed files with 115 additions and 18 deletions
@@ -8,17 +8,19 @@ namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Uns;
/// <summary>
/// Verifies that <see cref="UnsTreeService.LoadTagDriversForEquipmentAsync"/> surfaces each
/// candidate driver's <c>DriverType</c> alongside its id and display string, so the UNS TagModal
/// can later dispatch to a per-driver-type typed tag-config editor (F-uns-1).
/// candidate driver's <c>DriverType</c> and <c>DriverConfig</c> alongside its id and display string,
/// so the UNS TagModal can dispatch to a per-driver-type typed tag-config editor (F-uns-1) and feed
/// the selected gateway's config to the Galaxy live-browse address picker.
/// </summary>
[Trait("Category", "Unit")]
public sealed class UnsTreeServiceTagDriversTests
{
/// <summary>
/// A driver loaded for an equipment carries its <c>DriverType</c> in the returned tuple.
/// A driver loaded for an equipment carries its <c>DriverType</c> and <c>DriverConfig</c> in the
/// returned tuple.
/// </summary>
[Fact]
public async Task LoadTagDriversForEquipment_surfaces_driver_type()
public async Task LoadTagDriversForEquipment_surfaces_driver_type_and_config()
{
var dbName = $"uns-tagdrivers-{Guid.NewGuid():N}";
@@ -57,7 +59,7 @@ public sealed class UnsTreeServiceTagDriversTests
NamespaceId = "NS-EQ",
Name = "equipment driver",
DriverType = "ModbusTcp",
DriverConfig = "{}",
DriverConfig = """{"endpoint":"10.0.0.1:502"}""",
});
db.SaveChanges();
}
@@ -69,5 +71,7 @@ public sealed class UnsTreeServiceTagDriversTests
drivers.Count.ShouldBe(1);
drivers[0].DriverInstanceId.ShouldBe("DRV-EQ");
drivers[0].DriverType.ShouldBe("ModbusTcp");
// The picker (Galaxy live-browse) opens its session against the selected driver's config.
drivers[0].DriverConfig.ShouldBe("""{"endpoint":"10.0.0.1:502"}""");
}
}