fix(tests): add priority parameter to setupRemoteFeatureFlagsMock for…#27445
fix(tests): add priority parameter to setupRemoteFeatureFlagsMock for…#27445
Conversation
… proper flag handling
|
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. |
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, have a team admin enable autofix in the Cursor dashboard.
…k request configuration
|
✅ E2E Fixture Validation — Schema is up to date |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Changes to tests/api-mocking/helpers/remoteFeatureFlagsHelper.ts and tests/framework/fixtures/FixtureHelper.ts adjust mock priority handling for remote feature flags. This impacts E2E test infrastructure globally, particularly flows gated by feature flags (like Ramps). However, these are test-only infrastructure changes and do not affect production app logic. The priority fix ensures that test-specific feature flag overrides are not overwritten by the polling RemoteFeatureFlagController in DEV mode. Given the app code impact is isolated to the Ramp BuildQuote screen and the test changes focus on the on-ramp flow and feature-flag stability, the relevant E2E coverage is SmokeRamps. No wallet core, confirmations, network, identity, trade, perps, predictions, snaps, or multichain logic was modified. SmokeWalletPlatform is not required because there are no changes to wallet home, wallet actions entry points, or shared platform components—only the Ramp deposit quote screen. No dependency tags (e.g., SmokeConfirmations) are required since on-ramp flows do not use on-chain confirmations in the same way as swaps. Therefore, running SmokeRamps is sufficient and risk-balanced. Performance Test Selection: |
|



… proper flag handling
Description
SmokeRamps: Onramp Unified Buy tests were failing at BuildQuoteView.tapContinueButton() after the feature flag registry was
introduced in b01640b.
Root cause: RemoteFeatureFlagController polls the feature flags endpoint every 1 second in DEV mode (fetchInterval: DEV ? 1000
: ...). Combined with how mockttp matches rules at the same priority:
After b01640b changed rampsUnifiedBuyV1 production default to active: true, the failure shifted from the FundActionMenu (hidden
button) to the BuildQuote screen — because the app now navigated into the V2 ramp flow successfully on the first poll, then fell
back to the old V1 aggregator flow on the second poll 1 second later, breaking the test's expected interactions.
Fix
With this separation, mockttp evaluates priority 999 first on every subsequent poll. When a test has registered its own flag
overrides at 999, those always win. When no test-specific mock exists, the request falls through to priority 1 and gets the
production-accurate defaults.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: changes are limited to E2E mocking behavior and a
testIDprop on a UI button; main app logic is unaffected aside from improved test selectors.Overview
Stabilizes E2E flows that depend on remote feature flags by letting
setupRemoteFeatureFlagsMockregister rules at a caller-specified mockttp priority, and by registering the global default feature-flag mock at priority2so test-specific overrides at999remain effective across repeated polls.Re-enables the
Onramp Unified Buysmoke suite and adds atestID(BuildQuoteSelectors.CONTINUE_BUTTON) to the DepositBuildQuoteContinue button to make the flow reliably tappable in tests.Written by Cursor Bugbot for commit bd350db. This will update automatically on new commits. Configure here.