diff --git a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmsConfiguration.razor b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmsConfiguration.razor index 4b01803e..91696296 100644 --- a/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmsConfiguration.razor +++ b/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Pages/Notifications/SmsConfiguration.razor @@ -61,7 +61,7 @@
Max Retries
@sms.MaxRetries
Retry Delay
-
@sms.RetryDelay
+
@((int)sms.RetryDelay.TotalSeconds) s
diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs index 3ae97705..475a6702 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.Tests/Pages/NotificationListsPageTests.cs @@ -127,12 +127,15 @@ public class NotificationListsPageTests : BunitContext [Fact] public void RendersTypeColumn_Email() { + // The list name deliberately contains no channel word so that the only "Email" + // in the rendered markup originates from the Type column cell, not the name cell. + // This guards against false-passes where the name itself satisfies the assertion. var repo = Substitute.For(); repo.GetAllNotificationListsAsync() .Returns(Task.FromResult>( new List { - new("Email Alerts") { Id = 3, Type = NotificationType.Email } + new("Ops Alerts") { Id = 3, Type = NotificationType.Email } })); repo.GetRecipientsByListIdAsync(3) .Returns(Task.FromResult>( @@ -144,8 +147,15 @@ public class NotificationListsPageTests : BunitContext cut.WaitForAssertion(() => { - Assert.Contains("Email Alerts", cut.Markup); - Assert.Contains("Email", cut.Markup); + // Verify the row name rendered. + Assert.Contains("Ops Alerts", cut.Markup); + + // Locate the Type in the rendered table row and assert its text content + // is exactly "Email". If the Type column were removed the would not + // exist and the assertion would throw, catching the regression. + var typeCell = cut.FindAll("tbody tr td") + .FirstOrDefault(td => td.TextContent.Trim() == "Email"); + Assert.NotNull(typeCell); }); }