fix(e2e): drop networkidle from clearWalletState reload - #117
Merged
Conversation
Contributor
[OK] Button-Inventory-Audit — all clearChecked 72 testid(s) in |
TaprootFreak
force-pushed
the
fix/e2e-clearwallet-no-networkidle
branch
from
May 31, 2026 10:09
37af16e to
08c7aca
Compare
3 tasks
globalSetup deadlocks on CI at `page.reload({ waitUntil: 'networkidle' })`
since PR #102 — the boot path now fires a fire-and-forget `/api/info`
capabilities fetch on every page mount and the service worker
(public/sw.js) does stale-while-revalidate for every cached asset. On
the GitHub Azure runner those background requests can keep the
500 ms networkidle window from ever closing, hitting the 30 s timeout
in `_helpers/wallet.ts:47` before the page settles. All 9 open PRs
plus the develop→main release PR have been red on E2E since 2026-05-18
19:18 UTC because of this.
Switch the reload to `domcontentloaded`. The caller's next step is
always a testid-based locator assertion (with its own 15-30 s
auto-wait), which is the real readiness signal we want — the same
rationale already applied to `snap()` in `_helpers/screenshot.ts`.
Locally:
- 3× pass on the previously-failing 02-create-seed wallet-after-create
- 10/10 pass on 03-restore-seed.spec.ts
- 9/9 pass on 11-cross-spec-redirects + 12-a11y
TaprootFreak
force-pushed
the
fix/e2e-clearwallet-no-networkidle
branch
from
May 31, 2026 14:34
08c7aca to
b661bef
Compare
TaprootFreak
marked this pull request as ready for review
May 31, 2026 14:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
globalSetuphas been failing on every develop run since 2026-05-18 19:18 UTC ate2e/_helpers/wallet.ts:47:Trigger was PR #102 (
feat(features): consume server capabilities at runtime): the boot path insrc/app/page.tsxnow fires a fire-and-forget/api/infocapabilities fetch on every page mount. Combined with the service worker's stale-while-revalidate (public/sw.js), background traffic on a slow CI runner can keep the 500 msnetworkidlewindow from ever closing, deadlocking at the 30 s timeout. The page reachesloadand is fully interactive long before that — only thenetworkidleheuristic stalls.Switch to
domcontentloaded. The caller's next step is always a testid-based locator assertion with its own 15-30 s auto-wait — the real readiness signal. Same rationale already applied tosnap()inscreenshot.ts:80-84(which explicitly documents whynetworkidleis unsafe in this codebase).Impact
Without this fix, zero E2E tests can run on CI — every PR (currently 9 open + the develop→main release PR #67) shows
E2E Tests = FAILUREbecause globalSetup deadlocks. With this fix in, globalSetup completes and the suite proceeds.CI result on this PR
globalSetupcompletes (Alice + Bob are minted — visible in the run log)toHaveScreenshotmismatches on wallet / balance / send / receive / settings / PWA screens. Root cause: PR feat(features): consume server capabilities at runtime #102 changed WalletScreen rendering (DEV server now reportscapabilities: {faucet:true, usernames:true, ...}→ username-claim form + Faucet button + extra banner now render), but the visual baselines were last regenerated in PR test(e2e): regenerate visual baselines #62 (before PR feat(features): consume server capabilities at runtime #102). The diff PNG (artifact02-wallet-after-create-diff.png) shows the expected baseline is missing the new UI elements. Fix: runRegenerate Visual Baselinesworkflow against develop after this PR lands.Serverfehler 422: Unable to get merkle proofs for provided public keyin07-send / send-success— actual server-side error from Mutinynet, unrelated to E2E setup. Possibly transient; investigate separately if it persists.These 17 failures cannot be addressed in this PR without first landing the globalSetup fix — the baseline-regen workflow itself runs the same E2E suite and would deadlock identically on the current develop.
Test plan
02-create-seed wallet-after-create03-restore-seed.spec.ts11-cross-spec-redirects+12-a11yprettier --checkcleanglobalSetupcompletesRegenerate Visual Baselinesworkflow on develop to refresh stale baselines07-send/send-success422 if it recurs