test(e2e): remove Tenderly hosts from E2E allowlist (MMQA-1787)#29760
Conversation
Removes all four Tenderly entries from ALLOWLISTED_HOSTS by replacing the live network dependency with a default RPC mock and confirming the existing fixtures don't actually need Tenderly fork state. - api.tenderly.co + rpc.tenderly.co: zero references in tests/app code, delete as vestigial - virtual.linea.rpc.tenderly.co: already mocked by cardholder-mocks.ts for the only specs that exercise it (card-home-add-funds, card-button) - virtual.mainnet.rpc.tenderly.co: add a regex default mock returning eth_chainId 0x1 and standard JSON-RPC stubs (Tenderly Mainnet is semantically chain 1, so 0x1 is correct). Used by the on-ramp specs, which assert UI state, not chain state. Also removes the Detox blacklist entry for rpc.tenderly.co and deletes tests/helpers/tenderly/tenderly.js — the helper's only function (Tenderly.addFunds) was never called, making tenderly_setBalance dead code. ALLOWLISTED_HOSTS is now down to 7 entries. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Affected test areas:
The key risk is that removing Tenderly from the allowlist while adding mocks could cause test failures if any Tenderly RPC calls aren't fully covered by the new mocks (e.g., Polygon Tenderly has no explicit mock added). Running the affected test suites validates the mocking strategy works end-to-end. Performance Test Selection: |
|



Description
Removes all four Tenderly host entries from
ALLOWLISTED_HOSTSintests/api-mocking/mock-e2e-allowlist.ts. Parent epic MMQA-1364.The parent epic carved Tenderly out of scope on the assumption that fork-based tests required live Tenderly virtual networks for contract simulation. Re-investigation showed that assumption no longer holds.
Disposition per host:
api.tenderly.corpc.tenderly.covirtual.linea.rpc.tenderly.cocardholder-mocks.ts:247-268for the only specs that exercise it (card-home-add-funds.spec.ts,card-button.spec.ts)virtual.mainnet.rpc.tenderly.co0x0to standard JSON-RPC methods, mirroring the avax / zksync entries from MMQA-1785Bonus cleanup:
tests/helpers/tenderly/tenderly.jsis deleted. Its only function (Tenderly.addFunds()callingtenderly_setBalance) was never called from anywhere in the codebase — that helper was the original reason for the Tenderly carve-out, and it's dead code.The Detox blacklist entry
.*rpc.tenderly.co/.*inblacklistURLs.jsonis also dropped — those URLs are now intercepted by the mock server.After this lands,
ALLOWLISTED_HOSTSis down to 7 entries (4 local + Polymarket carve-out +metamask.github.io).Changelog
CHANGELOG entry: null
Related issues
MMQA-1787
Parent epic: MMQA-1364
Fixes:
Manual testing steps
Screenshots/Recordings
Before
tests/api-mocking/mock-e2e-allowlist.ts:tests/resources/blacklistURLs.json— Detox dropping the host at the network layer:tests/helpers/tenderly/tenderly.js— dead helper class withTenderly.addFunds().After
tests/api-mocking/mock-e2e-allowlist.ts— four hosts removed:tests/api-mocking/mock-responses/defaults/rpc-endpoints.ts— new entry for Tenderly mainnet:tests/resources/blacklistURLs.json— Tenderly entry removed.tests/helpers/tenderly/tenderly.js— file deleted.CI verification will be added once smoke tests complete on this PR.
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk test-infrastructure change that tightens E2E network mocking; main risk is unintended interception/mismatch of Tenderly RPC URLs causing E2E failures.
Overview
Removes all Tenderly domains from the E2E
ALLOWLISTED_HOSTS, reducing live-network carve-outs.Adds a default RPC mock for
virtual.mainnet.rpc.tenderly.cousing a regex URL matcher, deletes the unusedtests/helpers/tenderly/tenderly.jshelper, and drops the Detox.*rpc.tenderly.co/.*blacklist entry so these requests are handled by the mock server instead.Reviewed by Cursor Bugbot for commit 485d840. Bugbot is set up for automated code reviews on this repo. Configure here.