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)