test(e2e): unify toast assertion + extract shared PlaywrightDbConnection (review cleanups)

This commit is contained in:
Joseph Doherty
2026-06-05 11:00:27 -04:00
parent 5546c32593
commit 667d141f1a
5 changed files with 49 additions and 51 deletions
@@ -320,10 +320,8 @@ public class SiteCallsPageTests
// path can sit on the 10s inner relay timeout before the response —
// and the toast itself auto-dismisses 5s after it appears, so the
// assertion must catch it inside that window.
var toast = page.Locator(".toast");
await Assertions.Expect(toast).ToBeVisibleAsync(
new() { Timeout = 15_000 });
Assert.Equal(1, await toast.CountAsync());
await Assertions.Expect(page.Locator(".toast")).ToHaveCountAsync(
1, new() { Timeout = 15_000 });
}
finally
{