test(playwright): gate Audit non-API cURL assertion on rendered drawer body (review fix)

This commit is contained in:
Joseph Doherty
2026-06-07 04:09:24 -04:00
parent 3b71ac220a
commit e36adf8acd
@@ -808,8 +808,11 @@ public class AuditLogPageTests
await row.ClickAsync();
// 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='drawer-fields']")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("[data-test='copy-as-curl']")).ToHaveCountAsync(0);
}
finally
@@ -829,8 +832,8 @@ public class AuditLogPageTests
// the drawer, dismiss via the X, re-open, then dismiss via the footer,
// asserting the drawer is gone (count 0) after each.
// Escape-to-close is NOT wired on AuditDrilldownDrawer (only
// ExecutionDetailModal has a keydown handler); covering the X and
// footer-Close paths that ARE wired.
// ExecutionDetailModal has a keydown handler). The backdrop is also wired
// to HandleClose, but we cover the X and footer-Close paths here for brevity.
var runId = Guid.NewGuid().ToString("N");
var targetPrefix = $"playwright-test/wave4-audit2c/{runId}/";
var apiId = Guid.NewGuid();