fix(admin-ui): scope configuration modal lifecycles and validation

This commit is contained in:
Joseph Doherty
2026-11-13 23:24:56 -05:00
parent f7bc69e9c3
commit 79acb80da9
65 changed files with 17081 additions and 511 deletions
@@ -3,9 +3,8 @@ using Shouldly;
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests;
/// <summary>
/// Reads an AdminUI source file for a source-scan pin. The repo has no bUnit, so Razor wiring that a
/// unit test cannot render is pinned by scanning the markup; it proves the wiring exists, not that it
/// renders correctly (the docker-dev live pass covers that).
/// Reads an AdminUI source file for a source-scan pin alongside rendered component tests.
/// Source scans prove wiring exists; actual browser checks cover native behavior.
/// </summary>
internal static class AdminUiSource
{
@@ -14,12 +13,13 @@ internal static class AdminUiSource
/// <returns>The file text.</returns>
public static string Read(params string[] relativeSegments)
{
var dir = new DirectoryInfo(AppContext.BaseDirectory);
var dir = new DirectoryInfo(Path.GetDirectoryName(SourceFile())!);
while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "ZB.MOM.WW.OtOpcUa.slnx")))
dir = dir.Parent;
dir.ShouldNotBeNull("could not locate the repository root (no ZB.MOM.WW.OtOpcUa.slnx above the test binary)");
dir.ShouldNotBeNull("could not locate the repository root (no ZB.MOM.WW.OtOpcUa.slnx above the test source)");
var parts = new[] { dir!.FullName, "src", "Server", "ZB.MOM.WW.OtOpcUa.AdminUI" }.Concat(relativeSegments).ToArray();
return File.ReadAllText(Path.Combine(parts));
}
private static string SourceFile([System.Runtime.CompilerServices.CallerFilePath] string sourceFile = "") => sourceFile;
}