test(playwright): row-28 follow-through — three dialog flows still expected the old 'Delete' label (SiteCalls Discard, Notification Discard, Instance Disable); labels went explicit in 0db253b5 but these text asserts/filters were missed because that wave's suite run predated the rig redeploy
This commit is contained in:
+2
-2
@@ -98,8 +98,8 @@ public class DeploymentActionTests : IClassFixture<DeploymentFixture>
|
||||
.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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+5
-5
@@ -31,7 +31,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.SiteCalls;
|
||||
/// <item><c>RetryClickThrough</c> — clicking Retry on a Parked row confirms
|
||||
/// the dialog, relays to the owning site, and surfaces an outcome toast.</item>
|
||||
/// <item><c>DiscardClickThrough</c> — 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.</item>
|
||||
/// </list>
|
||||
/// </para>
|
||||
@@ -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 <see cref="RetryClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast"/>
|
||||
/// but exercises the Discard path: clicking Discard opens a <em>danger</em>
|
||||
/// confirm modal (Dialog.ConfirmAsync with <c>danger: true</c>), 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 <c>ShowRelayOutcome</c> surfaces exactly one outcome toast.
|
||||
/// </summary>
|
||||
[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).
|
||||
|
||||
Reference in New Issue
Block a user