From fb68bdb699e5842c6749d412aa095c337c2ba6b9 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Tue, 18 Aug 2026 07:25:57 -0400 Subject: [PATCH] test(dashboard): settings render test proves label-value pairing --- .../SettingsPageTagVisibilityRenderTests.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs index 0c8f7e9..0a99f8e 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Dashboard/SettingsPageTagVisibilityRenderTests.cs @@ -74,8 +74,9 @@ public sealed class SettingsPageTagVisibilityRenderTests } /// - /// RecentFaultLimit and RecentSessionLimit reach the page. Non-default values - /// prove the projection is plumbed through, not just that the defaults happen to render. + /// RecentFaultLimit and RecentSessionLimit reach the page, each value landing in + /// the row its own label names — not merely present somewhere in the document. Non-default + /// values prove the projection is plumbed through, not just that the defaults happen to render. /// /// A task that represents the asynchronous operation. [Fact] @@ -87,10 +88,11 @@ public sealed class SettingsPageTagVisibilityRenderTests RecentSessionLimit = 456, }); - Assert.Contains("Recent fault limit", html, StringComparison.Ordinal); - Assert.Contains("123", html, StringComparison.Ordinal); - Assert.Contains("Recent session limit", html, StringComparison.Ordinal); - Assert.Contains("456", html, StringComparison.Ordinal); + // Combined label+value fragments, matching the razor's exact markup (no whitespace between + // tags): a bare Contains on "123"/"456" would pass even if the values landed in the wrong + // row, or any other row on the page. + Assert.Contains("""Recent fault limit123""", html, StringComparison.Ordinal); + Assert.Contains("""Recent session limit456""", html, StringComparison.Ordinal); } private static async Task RenderAsync(DashboardOptions dashboard)