From 5774b30d0d04461aa37cefae4066adb7aacedba2 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 7 Jun 2026 04:15:25 -0400 Subject: [PATCH] test(playwright): scope Notification detail-modal title selector to the open modal (review fix) --- .../Notifications/NotificationActionTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs index b79cd45c..b3b93b7e 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs @@ -266,7 +266,9 @@ public class NotificationActionTests // not open the modal — the subject cell is the correct target. await row.Locator("td", new() { HasText = "wave4-detail" }).DblClickAsync(); await Assertions.Expect(page.Locator(".modal.show.d-block")).ToBeVisibleAsync(); - await Assertions.Expect(page.Locator(".modal-title")).ToContainTextAsync("Notification Detail"); + // Scope the title to the open modal — the page also renders Retry/Discard + // confirm dialogs that carry their own .modal-title. + await Assertions.Expect(page.Locator(".modal.show.d-block .modal-title")).ToContainTextAsync("Notification Detail"); // Close via the header X. await page.ClickAsync("button.btn-close[aria-label='Close']");