test(appium): harden wallet and TPSL keypad readiness in iOS smoke flows#32107
Open
cursor[bot] wants to merge 1 commit into
Open
test(appium): harden wallet and TPSL keypad readiness in iOS smoke flows#32107cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Co-authored-by: ramon.acitores <ramon.acitores@consensys.net>
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found All E2E tests pre-selected. |
|
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.



Description
Stabilizes two recurring iOS Appium flaky paths from the Mobile Appium health report:
deletes the account(flaky 6/44, 13.6%)adds stop loss to an open long from market details and closes when mark crosses SL(flaky 4/7, 57.1%)Failure signatures observed:
Error: element ("~wallet-screen") still not displayed after 300msindelete-account.spec.tsError: element ("~keypad-key-2") still not displayed after 10000msinperps-edit-tpsl-trigger.spec.tsFix:
loginAndOpenAccountListnow waits for a stronger wallet-ready Appium signal (walletSwapButton) instead of relying on wallet container visibility in this flow.PerpsOrderView.enterTpslTriggerPriceViaKeypadnow uses retry-backed keypad readiness before typing and retry-backed taps per keypad digit.Framework extrapolation rationale:
wallet.flow.ts,PerpsOrderView.ts) rather than single-spec patches, so all Appium tests reusing these paths get the same stability improvements.Validation:
yarn eslint tests/flows/wallet.flow.ts tests/page-objects/Perps/PerpsOrderView.ts(fails in this environment before lint execution: missing Yarn install state / node_modules state file).Changelog
CHANGELOG entry: null
Related issues
Refs: flaky report issue 3, flaky report issue 4 — https://consensys.slack.com/archives/C08388MPZ9V/p1781885100119159?thread_ts=1781885100.119159&cid=C08388MPZ9V
Manual testing steps
Screenshots/Recordings
Before
Issue 3 (
deletes the account):Issue 4 (
perps-edit-tpsl-trigger):/Users/runner/work/metamask-mobile/metamask-mobile/tests/test-reports/appium-smoke-videos/appium-perps-ios-smoke/ios-smoke-perps_perps-edit-tpsl-trigger.spec.ts__SmokePerps_Perps_-_Edit_TP_SL_trigger__adds_stop_loss_to_an_open_long_from_market_details_and_closes_when_mark_crosses_SL.mp4After
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Low Risk
Test-only changes in
wallet.flow.tsandPerpsOrderView.ts; no production app logic. Slightly longer waits on failure paths in CI.Overview
Reduces iOS Appium flake in shared test helpers by tightening when flows consider the UI ready, not by changing app code.
Wallet account-list path: After Playwright login,
loginAndOpenAccountListno longer waits on the wallet container. It waits on the wallet swap control viaPlaywrightAssertions, so account-list navigation runs only after a stronger “wallet is usable” signal.Perps TP/SL keypad:
enterTpslTriggerPriceViaKeypadretries focusing the trigger input until the first keypad key is visible, then retries each digit tap. Take-profit and stop-loss entry that use this helper inherit the same behavior.Callers of these helpers (account smoke specs, perps TP/SL specs) get the stabilization without per-spec changes.
Reviewed by Cursor Bugbot for commit 6435c1c. Bugbot is set up for automated code reviews on this repo. Configure here.