test(e2e): harden Transport export test — render sentinel + step-scoped Next (review fix)

This commit is contained in:
Joseph Doherty
2026-06-06 12:19:38 -04:00
parent 79586ca5ad
commit 3f88de932c
@@ -57,7 +57,10 @@ public sealed class TransportExportTests
{
var page = await _fixture.NewAuthenticatedPageAsync("multi-role", "password");
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/transport/export");
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
// Wait for Step-1 to render (OnInitializedAsync makes 8 repo calls over SignalR
// before the template tree appears — NetworkIdle is an unreliable proxy for this).
await Assertions.Expect(page.Locator("[data-testid='group-templates']"))
.ToBeVisibleAsync(new() { Timeout = 15_000 });
// ── STEP 1: Select ────────────────────────────────────────────────────────
// Narrow the tree to just the zztest template, then tick its checkbox.
@@ -82,9 +85,12 @@ public sealed class TransportExportTests
// ── STEP 2: Review ────────────────────────────────────────────────────────
// The seed group lists the picked template; Next is always enabled here.
// Scope the Next click to the Step-2 panel — identified by its unique
// #include-deps toggle — so it cannot accidentally match a Step-1 button.
await Assertions.Expect(page.Locator("[data-testid='seed-group']"))
.ToBeVisibleAsync(new() { Timeout = 15_000 });
await page.Locator("button.btn.btn-primary:has-text('Next')").ClickAsync();
await page.Locator("div:has(#include-deps) button.btn.btn-primary:has-text('Next')")
.ClickAsync();
// ── STEP 3: Encrypt ───────────────────────────────────────────────────────
const string passphrase = "zztest-passphrase-123";