mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-11-02 15:28:09 +00:00
* feat(mobile): add stable per-transaction testID to transaction cards TxInfo now stamps every card it renders with testID="tx-card-<txId>" (caller-supplied testID wins), and the four card types that did not forward SafeListItemProps (StakingTxExit, StakingTxWithdraw, TxBridge, TxLifiSwap) now spread them like the rest. This lets E2E flows target a transaction by identity instead of list position, which breaks whenever the shared test Safe's queue drifts. * tests(mobile): target safe-shield tx by id instead of list position The shared test Safe's queue gained four conflicting nonce-3 transactions that all render as identical "Contract interaction" cards, so TAP_INDEX: 1 opened the wrong transaction. tap-tx-card now supports TAP_ID (scroll-until-visible + tap on the tx-card-<txId> testID) and the malicious contract-interaction flow uses it; the TAP_TEXT/TAP_INDEX path is unchanged for existing callers. * tests(mobile): make change-currency robust to backend list order The supported-fiat-codes endpoint now returns extra crypto tickers at the head of the list, pushing EUR/GBP below the fold and breaking the viewport assertions. Scroll to known entries in list order (USD, EUR, GBP) instead of asserting on the initial viewport. * tests(mobile): address review findings — order-independent flows - change-currency: use the currency search field instead of scroll order assumptions; dismiss the keyboard before tapping a row (first tap only closes the keyboard otherwise) and match full row labels so the search input's own text can't be tapped. - batch-3-actions-benign/-warn: migrate from TAP_INDEX to TAP_ID. - tap-tx-card: treat whitespace-only TAP_ID as unset. - TxInfo: document why the default testID precedes the props spread. --------- Co-authored-by: Hanzo Dev <[email protected]>
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
appId: ${APP_ID}
|
|
tags:
|
|
- util
|
|
---
|
|
# ===========================================
|
|
# Tap Pending Transaction Card (Reusable)
|
|
# ===========================================
|
|
# Waits for and taps on a pending transaction card, then verifies Confirm transaction screen
|
|
#
|
|
# Environment variables:
|
|
# TAP_ID: Card testID to tap (e.g. "tx-card-multisig_0xSafe..._0xHash...").
|
|
# Preferred — immune to queue reordering. When set, WAIT_FOR/TAP_TEXT/TAP_INDEX are ignored.
|
|
# WAIT_FOR: Text pattern to wait for (e.g., ".*addOwnerWithThreshold.*", ".*0\.001 MATIC.*")
|
|
# TAP_TEXT: Text to tap on (e.g., "Settings change", ".*0\.001 MATIC.*")
|
|
# TAP_INDEX: Optional index if multiple matches (default: 0)
|
|
|
|
- evalScript: '${output.useTapId = (typeof TAP_ID !== "undefined" && TAP_ID.trim() !== "")}'
|
|
|
|
- runFlow:
|
|
when:
|
|
true: ${output.useTapId}
|
|
commands:
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: '${TAP_ID}'
|
|
- tapOn:
|
|
id: '${TAP_ID}'
|
|
|
|
- runFlow:
|
|
when:
|
|
true: ${!output.useTapId}
|
|
commands:
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '${WAIT_FOR}'
|
|
timeout: 10000
|
|
- evalScript: '${output.tapIndex = (typeof TAP_INDEX !== "undefined") ? parseInt(TAP_INDEX) : 0}'
|
|
- tapOn:
|
|
text: '${TAP_TEXT}'
|
|
index: ${output.tapIndex}
|