diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DeploymentActionTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DeploymentActionTests.cs index 28e1add0..3ad366a0 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DeploymentActionTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Deployment/DeploymentActionTests.cs @@ -98,8 +98,8 @@ public class DeploymentActionTests : IClassFixture .ClickAsync(); // Disable is a danger action: it raises a confirm modal first. Confirm via - // the danger button (labelled "Delete" for every danger confirm). - await page.Locator(".modal-footer .btn-danger", new() { HasText = "Delete" }) + // the danger button (explicit "Disable" label since row 28). + await page.Locator(".modal-footer .btn-danger", new() { HasText = "Disable" }) .ClickAsync(); // One outcome toast (confirmation or fast error). ToHaveCountAsync retries 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 bc88d704..e41833b3 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/NotificationActionTests.cs @@ -153,11 +153,11 @@ public class NotificationActionTests await Assertions.Expect(row.Locator("button.btn.btn-outline-danger")).ToBeVisibleAsync(); await row.Locator("button.btn.btn-outline-danger").ClickAsync(); - // Confirm the action — danger footer button labelled "Delete" (the discard + // Confirm the action — danger footer button labelled "Discard" (the discard // dialog opens with danger: true). var deleteButton = page.Locator(".modal-footer .btn-danger"); await Assertions.Expect(deleteButton).ToBeVisibleAsync(); - await Assertions.Expect(deleteButton).ToHaveTextAsync("Delete"); + await Assertions.Expect(deleteButton).ToHaveTextAsync("Discard"); await deleteButton.ClickAsync(); // The discard moves the central row to Discarded and surfaces a single success diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/SiteCalls/SiteCallsPageTests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/SiteCalls/SiteCallsPageTests.cs index 7ce46b15..67bfeec6 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/SiteCalls/SiteCallsPageTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/SiteCalls/SiteCallsPageTests.cs @@ -31,7 +31,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls; /// RetryClickThrough — clicking Retry on a Parked row confirms /// the dialog, relays to the owning site, and surfaces an outcome toast. /// DiscardClickThrough — clicking Discard on a Parked row confirms -/// the danger dialog ("Delete"), relays to the owning site, and surfaces an +/// the danger dialog ("Discard" since the row-28 explicit labels), relays to the owning site, and surfaces an /// outcome toast. /// /// @@ -309,7 +309,7 @@ public class SiteCallsPageTests await parkedRow.Locator("button:has-text('Retry')").ClickAsync(); // Confirm the relay in the dialog footer ("Confirm" — the non-danger - // label; Discard would render "Delete"). + // label; Discard renders its explicit "Discard" label). var confirmButton = page.Locator(".modal-footer button:has-text('Confirm')"); await Assertions.Expect(confirmButton).ToBeVisibleAsync(); await confirmButton.ClickAsync(); @@ -336,7 +336,7 @@ public class SiteCallsPageTests /// Mirrors /// but exercises the Discard path: clicking Discard opens a danger /// confirm modal (Dialog.ConfirmAsync with danger: true), whose footer - /// button is labelled "Delete" (not "Confirm"). Confirming relays a discard to + /// button is labelled "Discard" (explicit label since row 28; not "Confirm"). Confirming relays a discard to /// the owning site and ShowRelayOutcome surfaces exactly one outcome toast. /// [SkippableFact] @@ -373,10 +373,10 @@ public class SiteCallsPageTests // Discard opens the danger confirm modal. await parkedRow.Locator("button:has-text('Discard')").ClickAsync(); - // Danger confirm — labelled "Delete" (Dialog.ConfirmAsync(..., danger: true)). + // Danger confirm — labelled "Discard" (Dialog.ConfirmAsync(..., danger: true, confirmLabel: "Discard")). var deleteButton = page.Locator(".modal-footer .btn-danger"); await Assertions.Expect(deleteButton).ToBeVisibleAsync(); - await Assertions.Expect(deleteButton).ToHaveTextAsync("Delete"); + await Assertions.Expect(deleteButton).ToHaveTextAsync("Discard"); await deleteButton.ClickAsync(); // One outcome toast (Applied / NotParked / SiteUnreachable — tolerant).