test(playwright): gate Audit non-API cURL assertion on rendered drawer body (review fix)
This commit is contained in:
@@ -808,8 +808,11 @@ public class AuditLogPageTests
|
|||||||
await row.ClickAsync();
|
await row.ClickAsync();
|
||||||
|
|
||||||
// The drawer opens for the DbOutbound row, but the cURL action — gated
|
// The drawer opens for the DbOutbound row, but the cURL action — gated
|
||||||
// on IsApiChannel — is absent.
|
// on IsApiChannel — is absent. Wait for the AuditEventDetail body
|
||||||
|
// ([data-test='drawer-fields']) to render BEFORE the negative count
|
||||||
|
// assertion, so a not-yet-rendered child can't false-pass count 0.
|
||||||
await Assertions.Expect(page.Locator("[data-test='audit-drilldown-drawer']")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("[data-test='audit-drilldown-drawer']")).ToBeVisibleAsync();
|
||||||
|
await Assertions.Expect(page.Locator("[data-test='drawer-fields']")).ToBeVisibleAsync();
|
||||||
await Assertions.Expect(page.Locator("[data-test='copy-as-curl']")).ToHaveCountAsync(0);
|
await Assertions.Expect(page.Locator("[data-test='copy-as-curl']")).ToHaveCountAsync(0);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -829,8 +832,8 @@ public class AuditLogPageTests
|
|||||||
// the drawer, dismiss via the X, re-open, then dismiss via the footer,
|
// the drawer, dismiss via the X, re-open, then dismiss via the footer,
|
||||||
// asserting the drawer is gone (count 0) after each.
|
// asserting the drawer is gone (count 0) after each.
|
||||||
// Escape-to-close is NOT wired on AuditDrilldownDrawer (only
|
// Escape-to-close is NOT wired on AuditDrilldownDrawer (only
|
||||||
// ExecutionDetailModal has a keydown handler); covering the X and
|
// ExecutionDetailModal has a keydown handler). The backdrop is also wired
|
||||||
// footer-Close paths that ARE wired.
|
// to HandleClose, but we cover the X and footer-Close paths here for brevity.
|
||||||
var runId = Guid.NewGuid().ToString("N");
|
var runId = Guid.NewGuid().ToString("N");
|
||||||
var targetPrefix = $"playwright-test/wave4-audit2c/{runId}/";
|
var targetPrefix = $"playwright-test/wave4-audit2c/{runId}/";
|
||||||
var apiId = Guid.NewGuid();
|
var apiId = Guid.NewGuid();
|
||||||
|
|||||||
Reference in New Issue
Block a user