test(e2e): cap live browser contexts to bound Blazor circuit pressure (fixes full-suite timeouts); import negative-test review fixes

This commit is contained in:
Joseph Doherty
2026-06-06 12:33:06 -04:00
parent b52f7281aa
commit 09f14f18ea
2 changed files with 47 additions and 4 deletions
@@ -190,7 +190,7 @@ public class TransportImportTests
await CliRunner.AddAttributeAsync(tmplId, "Value", "Double");
await CliRunner.BundleExportAsync(bundlePath, tmplId, "correct-passphrase-1", "src-env");
var page = await _fixture.NewAuthenticatedPageAsync("multi-role", "password");
var page = await _fixture.NewAuthenticatedPageAsync();
// ── STEP 1: Upload ────────────────────────────────────────────────────────
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/transport/import");
@@ -213,7 +213,9 @@ public class TransportImportTests
await Assertions.Expect(page.Locator("[data-testid='error-message']"))
.ToContainTextAsync("Wrong passphrase. Please try again.", new() { Timeout = 10_000 });
await Assertions.Expect(page.Locator("#import-passphrase")).ToBeVisibleAsync();
await Assertions.Expect(page.Locator("[data-testid='diff-summary']")).ToBeHiddenAsync();
// Assert the diff step is genuinely absent (the @switch never rendered it), not merely
// hidden — ToBeHiddenAsync is vacuously true for an element that doesn't exist.
await Assertions.Expect(page.Locator("[data-testid='diff-summary']")).ToHaveCountAsync(0);
// Secondary indicator: one failed attempt recorded (1 of MaxUnlockAttempts).
await Assertions.Expect(page.Locator("[data-testid='unlock-attempts']"))