Merge branch 'fix/audit-grid-resize-flaky-test': stabilise audit-grid resize E2E

This commit is contained in:
Joseph Doherty
2026-05-22 08:00:46 -04:00

View File

@@ -146,6 +146,14 @@ public class AuditGridColumnTests
Assert.True(after > before + 40,
$"Expected the {columnKey} column to widen after the resize drag (before={before}, after={after}).");
// The resize persists asynchronously: pointer-up fires a
// fire-and-forget JS→.NET OnColumnResized invoke, and the .NET
// handler then round-trips back through JS interop to write
// sessionStorage. Wait for that write to land before reloading —
// otherwise the reload races it and the restored grid falls back
// to the default width.
await WaitForStorageKeyAsync(page, "auditGrid:columnWidths");
// Reload: the persisted width is restored from sessionStorage.
await page.ReloadAsync();
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);