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();
|
.ClickAsync();
|
||||||
|
|
||||||
// Disable is a danger action: it raises a confirm modal first. Confirm via
|
// Disable is a danger action: it raises a confirm modal first. Confirm via
|
||||||
// the danger button (labelled "Delete" for every danger confirm).
|
// the danger button (explicit "Disable" label since row 28).
|
||||||
await page.Locator(".modal-footer .btn-danger", new() { HasText = "Delete" })
|
await page.Locator(".modal-footer .btn-danger", new() { HasText = "Disable" })
|
||||||
.ClickAsync();
|
.ClickAsync();
|
||||||
|
|
||||||
// One outcome toast (confirmation or fast error). ToHaveCountAsync retries
|
// 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 Assertions.Expect(row.Locator("button.btn.btn-outline-danger")).ToBeVisibleAsync();
|
||||||
await row.Locator("button.btn.btn-outline-danger").ClickAsync();
|
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).
|
// dialog opens with danger: true).
|
||||||
var deleteButton = page.Locator(".modal-footer .btn-danger");
|
var deleteButton = page.Locator(".modal-footer .btn-danger");
|
||||||
await Assertions.Expect(deleteButton).ToBeVisibleAsync();
|
await Assertions.Expect(deleteButton).ToBeVisibleAsync();
|
||||||
await Assertions.Expect(deleteButton).ToHaveTextAsync("Delete");
|
await Assertions.Expect(deleteButton).ToHaveTextAsync("Discard");
|
||||||
await deleteButton.ClickAsync();
|
await deleteButton.ClickAsync();
|
||||||
|
|
||||||
// The discard moves the central row to Discarded and surfaces a single success
|
// 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
|
/// <item><c>RetryClickThrough</c> — clicking Retry on a Parked row confirms
|
||||||
/// the dialog, relays to the owning site, and surfaces an outcome toast.</item>
|
/// the dialog, relays to the owning site, and surfaces an outcome toast.</item>
|
||||||
/// <item><c>DiscardClickThrough</c> — clicking Discard on a Parked row confirms
|
/// <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>
|
/// outcome toast.</item>
|
||||||
/// </list>
|
/// </list>
|
||||||
/// </para>
|
/// </para>
|
||||||
@@ -309,7 +309,7 @@ public class SiteCallsPageTests
|
|||||||
await parkedRow.Locator("button:has-text('Retry')").ClickAsync();
|
await parkedRow.Locator("button:has-text('Retry')").ClickAsync();
|
||||||
|
|
||||||
// Confirm the relay in the dialog footer ("Confirm" — the non-danger
|
// 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')");
|
var confirmButton = page.Locator(".modal-footer button:has-text('Confirm')");
|
||||||
await Assertions.Expect(confirmButton).ToBeVisibleAsync();
|
await Assertions.Expect(confirmButton).ToBeVisibleAsync();
|
||||||
await confirmButton.ClickAsync();
|
await confirmButton.ClickAsync();
|
||||||
@@ -336,7 +336,7 @@ public class SiteCallsPageTests
|
|||||||
/// Mirrors <see cref="RetryClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast"/>
|
/// Mirrors <see cref="RetryClickThrough_OnParkedRow_ConfirmsRelayAndShowsOutcomeToast"/>
|
||||||
/// but exercises the Discard path: clicking Discard opens a <em>danger</em>
|
/// but exercises the Discard path: clicking Discard opens a <em>danger</em>
|
||||||
/// confirm modal (Dialog.ConfirmAsync with <c>danger: true</c>), whose footer
|
/// 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.
|
/// the owning site and <c>ShowRelayOutcome</c> surfaces exactly one outcome toast.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SkippableFact]
|
[SkippableFact]
|
||||||
@@ -373,10 +373,10 @@ public class SiteCallsPageTests
|
|||||||
// Discard opens the danger confirm modal.
|
// Discard opens the danger confirm modal.
|
||||||
await parkedRow.Locator("button:has-text('Discard')").ClickAsync();
|
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");
|
var deleteButton = page.Locator(".modal-footer .btn-danger");
|
||||||
await Assertions.Expect(deleteButton).ToBeVisibleAsync();
|
await Assertions.Expect(deleteButton).ToBeVisibleAsync();
|
||||||
await Assertions.Expect(deleteButton).ToHaveTextAsync("Delete");
|
await Assertions.Expect(deleteButton).ToHaveTextAsync("Discard");
|
||||||
await deleteButton.ClickAsync();
|
await deleteButton.ClickAsync();
|
||||||
|
|
||||||
// One outcome toast (Applied / NotParked / SiteUnreachable — tolerant).
|
// One outcome toast (Applied / NotParked / SiteUnreachable — tolerant).
|
||||||
|
|||||||
Reference in New Issue
Block a user