48af177dce
.app-shell min-height is now 100vh with a 100dvh override (the 3.3rem was a donor-app top-bar leftover; ThemeShell has no top bar) and the lg+ sticky rail is 100vh/100dvh. Source bumped to 0.5.3, UNPUBLISHED. Adds a static regression test and fixes the CS8602 in NavStateScriptTests (0 warnings). Browser-checked via Overview on local 0.5.2 vs 0.5.3 packages: at 390x844 a short page went from a 791px shell (53px gap) to 844px, no extra scroll; 1440x900 rail stays sticky full-height. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace ZB.MOM.WW.Theme.Tests;
|
|
|
|
/// <summary>
|
|
/// Theme-008: nav-state.js must not stack toggle listeners when Blazor's enhanced-navigation DOM
|
|
/// sync strips its marker attribute. Runs <c>nav-state.test.js</c> under Node (a DOM stub, no
|
|
/// jsdom); silently passes only when Node is not installed.
|
|
/// </summary>
|
|
public class NavStateScriptTests
|
|
{
|
|
private static string Here([CallerFilePath] string path = "") => Path.GetDirectoryName(path)!;
|
|
|
|
[Fact]
|
|
public void NavState_does_not_stack_listeners_or_persist_the_transient_reveal()
|
|
{
|
|
var script = Path.GetFullPath(Path.Combine(Here(), "..", "..", "src", "ZB.MOM.WW.Theme", "wwwroot", "js", "nav-state.js"));
|
|
var test = Path.Combine(Here(), "nav-state.test.js");
|
|
|
|
Process? node;
|
|
try
|
|
{
|
|
node = Process.Start(new ProcessStartInfo("node", $"\"{test}\" \"{script}\"")
|
|
{
|
|
RedirectStandardOutput = true,
|
|
RedirectStandardError = true,
|
|
});
|
|
}
|
|
catch (System.ComponentModel.Win32Exception)
|
|
{
|
|
return; // Node not available on this machine.
|
|
}
|
|
|
|
Assert.NotNull(node);
|
|
using (node)
|
|
{
|
|
var output = node.StandardOutput.ReadToEnd() + node.StandardError.ReadToEnd();
|
|
node.WaitForExit();
|
|
Assert.True(node.ExitCode == 0, output);
|
|
}
|
|
}
|
|
}
|