mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* fix(mobile): expose dialog modal contents to accessibility
The overlay/container Pressables collapsed the dialog into one merged
a11y element (e.g. Cancel and Save read as a single label). Mark them
accessible={false} so the title, input and buttons stay individually
addressable for VoiceOver.
* tests(mobile): add draft-editor e2e setup harness
setupSendFlow seeds the primary Safe with an owner signer for the send
flow; setupApprovalDraft composes a swap-shaped multiSend draft (COW
approve + follow-up call) directly — the editors only render for drafts
— and surfaces the async outcome as e2e-draft-setup-ready/-failed
markers. Adds shared draft-editor timeouts to defaults.js.
* tests(mobile): add nonce-editor and approval-editor Maestro flows
send-nonce-editor drives the real send flow to a draft, then edits the
nonce (too-low custom value errors, a high one rebuilds and shows on the
row, recommended pick replaces it). approval-editor edits the approve
amount and toggles unlimited through the rebuild/redirect. Neither flow
signs or proposes — staging is only read.
* tests(mobile): verify approve action amount after each edit
After changing the approval value (edit to 2.5, then unlimited), open the
Actions row → approve action and assert its decoded on-chain _value in wei,
so the test checks the rebuilt calldata rather than just the display pill.
* tests(mobile): assert approve spender in the approval editor flow
Check the spender address in the approve action detail alongside the
amount, so an amount edit that also altered the spender would be caught.
* tests(mobile): verify nonce in transaction details after each change
After each nonce change (custom then recommended), open the transaction
details and assert the Nonce row matches the confirm-screen row. Uses
copyTextFrom so it works for the dynamic recommended nonce too.
* tests(mobile): address review polish on draft-editors setup
- waitFor: accept falsy non-null values (value != null) so future
callers returning 0/''/false don't silently time out
- assert setupSendFlow triggers onboarding navigation
* tests(mobile): remove draft-editors suite orchestrator
The send-nonce-editor and approval-editor flows reset state
independently and run standalone, so the suite wrapper is redundant.
---------
Co-authored-by: Hanzo Dev <[email protected]>
136 lines
3.6 KiB
YAML
136 lines
3.6 KiB
YAML
appId: ${APP_ID}
|
|
tags:
|
|
- transactions
|
|
- draft-editors
|
|
---
|
|
# Nonce editor via the real send flow: build a draft, set a custom nonce (rebuilds
|
|
# under a new safeTxHash, shown on the row), then pick recommended to replace it.
|
|
# Nothing is signed or proposed.
|
|
|
|
- runScript:
|
|
file: ../../../utils/scripts/defaults.js
|
|
|
|
- runFlow:
|
|
file: ../../../utils/setup/app-start.yml
|
|
|
|
# Primary Safe (holds ETH on staging) + owner signer so the send button shows.
|
|
- tapOn:
|
|
id: 'e2eSendFlow'
|
|
- assertVisible:
|
|
id: 'home-tab'
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'send-button'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- tapOn:
|
|
id: 'send-button'
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'recipient-input'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'recipient-input'
|
|
- inputText: '0x4d5CF9E6df9a95F4c1F5398706cA27218add5949'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'continue-button'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'continue-button'
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'send-token-ETH'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- tapOn:
|
|
id: 'send-token-ETH'
|
|
|
|
# The amount TextInput is invisible (opacity 0) and auto-focused — Maestro
|
|
# can't see it, so type directly and assert the mirrored display instead.
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: 'Review & confirm'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- inputText: '0.01'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*0\.01.*'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'review-button'
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: 'Confirm transaction'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'nonce-row'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- assertVisible:
|
|
id: 'nonce-row-value'
|
|
|
|
# Custom nonce: too-low errors, a high value saves and rebuilds the draft.
|
|
- tapOn:
|
|
id: 'nonce-row'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'nonce-recommended'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'nonce-add-custom'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'custom-nonce-input'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- eraseText
|
|
- inputText: '0'
|
|
- assertVisible:
|
|
id: 'custom-nonce-error'
|
|
- eraseText
|
|
- inputText: '99999'
|
|
- assertNotVisible:
|
|
id: 'custom-nonce-error'
|
|
# The number-pad covers the dialog's Save row (KeyboardAvoidingView doesn't lift
|
|
# inside an RN Modal), so blur the input by tapping the title (above the keyboard,
|
|
# non-interactive) to drop it — otherwise the Save tap is absorbed by the keyboard.
|
|
- tapOn:
|
|
text: 'New nonce'
|
|
- tapOn:
|
|
id: 'dialog-save'
|
|
- extendedWaitUntil:
|
|
notVisible:
|
|
id: 'custom-nonce-input'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'nonce-row'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- assertVisible:
|
|
id: 'nonce-row-value'
|
|
text: '99999'
|
|
# The rebuilt draft's transaction details must carry the same nonce.
|
|
- runFlow:
|
|
file: ../../../utils/components/draft-editors/verify-details-nonce.yml
|
|
|
|
# Back to the recommended nonce: the custom value must disappear from the row.
|
|
- tapOn:
|
|
id: 'nonce-row'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'nonce-recommended'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'nonce-recommended'
|
|
- extendedWaitUntil:
|
|
notVisible:
|
|
text: '99999'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- assertVisible:
|
|
id: 'nonce-row-value'
|
|
# Details must reflect the recommended nonce too.
|
|
- runFlow:
|
|
file: ../../../utils/components/draft-editors/verify-details-nonce.yml
|