fix: restore devnet/testnet e2e contract tests - #1998
Conversation
…e2e tests The auto-generated CustomAsset.ts contained TypeScript declare fields that Playwright's Babel transform cannot handle. The deploy script already strips these, but devnet/testnet workflows use committed files directly.
PR SummaryMedium Risk Overview This removes brittle UI-driven account address retrieval (XPath + clipboard) in favor of querying the wallet DB and normalizing via Written by Cursor Bugbot for commit d735c55. This will update automatically on new commits. Configure here. |
…countNumber The e2e test used a hardcoded XPath to find accounts by list position, but the UI sorts accounts alphabetically with the current account pinned first, causing position mismatches and test failures.
Remove redundant `declare` blocks from CustomAsset.ts (the `interface` and `functions` type declarations) to clean up generated TypeScript typings. Also delete the outdated CustomAsset.ts.bak backup file. This is a non-functional cleanup to reduce duplicate/type clutter in the contract bindings.
…tion Sepolia Devnet'
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
Fix devnet/testnet E2E contract tests that were completely broken due to a Babel transpilation error, and resolve several secondary issues causing test flakiness.
Root cause: The
fuelsSDK code generator produces TypeScriptdeclareclass fields inCustomAsset.ts, which are incompatible with Playwright's Babel transform pipeline. This caused aSyntaxErrorthat prevented all devnet/testnet E2E tests from running.Additional fixes:
getAddressForAccountNumber— accounts are sorted alphabetically in the UI, not by creation ordergetWalletPopupPagerace condition where popups opening beforewaitForEventwas registered were missed — now uses concurrent polling + event listeningProviders.tsxto correctly distinguish devnet vs testnet based on provider URLaddNetworkto prevent downstream flakinessFuel Ignition Sepolia Devnet)FuelWalletTestHelperto include.htmlextensionMainContractandExternalContractto both devnet and testnet with fresh state (old contracts had accumulated state causingArithmeticOverflow)fast-xml-parseroverride to resolve critical audit vulnerabilityChecklist