test: Fix SmokeTrade E2E tests#29523
Conversation
|
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. |
7decf0f to
8875385
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3533884. Configure here.
b5784c3 to
b3e444c
Compare
b3e444c to
e345f63
Compare
| await loginToApp(); | ||
| await device.sendToHome(); | ||
| // intentional: Detox iOS 16+ sendToHome briefly opens Settings; wait before launchApp({ url }). | ||
| if (device.getPlatform() === 'ios') await TestHelpers.delay(1000); |
There was a problem hiding this comment.
According to AI , device.sendToHome() with iOS < 16 goes straight to the home screen. However as you see in the video on iOS 16+ Detox briefly open and close Settings in order to push the app to the background. AI suggest that the only way is to wait to allow app to go to the background. Unfortunately Detox does not reliably see the iOS Settings page so there's not a way to wait until it disappears.
test.mp4
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No app source code was changed, so no broader impact on other test areas. Performance Test Selection: |
|




Description
This PR should fix the following SmokeTrade tests:
SmokeTrade: Swap from Actions swaps ETH->USDC with custom slippage and USDC->ETH (failed 1 time, 0 retries) - last log
SmokeTrade: Swap Deep Link Tests - Unified Bridge Experience navigate to bridge view with full parameters (USDC to USDT) (failed 1 time, 0 retries) - last log
SmokeTrade: Gasless Swap - completes a gasless 7702 ETH to MUSD swap (native source) (failed 1 time, 0 retries) - last log
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
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
Test-only changes that adjust Detox app launching behavior and add additional HTTP mocks; low risk to production code, with minor risk of masking real integration issues if mock matching is too broad.
Overview
Stabilizes swap deeplink smoke tests on iOS by adding a short post-
sendToHome()delay and launching deeplinks withnewInstance: falseto ensure URLs are delivered to the existing app instance.Expands swap E2E mocking by introducing reusable
setupSwapSocialAndComplianceMocks()to stub the Social leaderboard and compliance batch endpoints, wiring it into swap and trending-token smoke setups. Also tightens the swap proxy URL interception so theinsufficientBalrewrite only targets JSONgetQuoterequests (notgetQuoteStream).Reviewed by Cursor Bugbot for commit edbfe2c. Bugbot is set up for automated code reviews on this repo. Configure here.