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]>
94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
appId: ${APP_ID}
|
|
tags:
|
|
- transactions
|
|
- draft-editors
|
|
---
|
|
# Approval editor: e2eApprovalDraft composes a multiSend (COW approve + call) and
|
|
# opens the confirm screen — the editor only renders for drafts. Editing the amount
|
|
# and toggling unlimited each rebuild the draft; nothing is signed or proposed.
|
|
|
|
- runScript:
|
|
file: ../../../utils/scripts/defaults.js
|
|
|
|
- runFlow:
|
|
file: ../../../utils/setup/app-start.yml
|
|
|
|
# Compose is async (SDK init + CGW fetch) — gate on the ready marker.
|
|
- tapOn:
|
|
id: 'e2eApprovalDraft'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'e2e-draft-setup-ready'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: 'Confirm transaction'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'approval-editor'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
# Pill reads "<amount> COW"; the decimal separator is locale-dependent.
|
|
- assertVisible:
|
|
text: '.*1[.,]5 COW.*'
|
|
|
|
# centerElement so the button clears the pinned Continue footer (which otherwise
|
|
# overlaps it and absorbs the tap).
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: 'edit-approval-button'
|
|
direction: DOWN
|
|
centerElement: true
|
|
- tapOn:
|
|
id: 'edit-approval-button'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'input-approval-amount'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'input-approval-amount'
|
|
- eraseText
|
|
- inputText: '2.5'
|
|
- tapOn:
|
|
id: 'save-approval-button'
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'approval-editor'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*2[.,]5 COW.*'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
# Verify the rebuilt action carries the edited amount (2.5 COW = 2.5e18 wei).
|
|
- runFlow:
|
|
file: ../../../utils/components/draft-editors/verify-approve-amount.yml
|
|
env:
|
|
EXPECTED_APPROVAL_VALUE: '2500000000000000000'
|
|
|
|
- scrollUntilVisible:
|
|
element:
|
|
id: 'edit-approval-button'
|
|
direction: DOWN
|
|
centerElement: true
|
|
- tapOn:
|
|
id: 'edit-approval-button'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: 'switch-unlimited-approval'
|
|
timeout: ${output.defaults.draftUiTimeout}
|
|
- tapOn:
|
|
id: 'switch-unlimited-approval'
|
|
- tapOn:
|
|
id: 'save-approval-button'
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: 'Unlimited'
|
|
timeout: ${output.defaults.draftNetworkTimeout}
|
|
# Verify the rebuilt action carries the unlimited amount (2^256 - 1 wei).
|
|
- runFlow:
|
|
file: ../../../utils/components/draft-editors/verify-approve-amount.yml
|
|
env:
|
|
EXPECTED_APPROVAL_VALUE: '115792089237316195423570985008687907853269984665640564039457584007913129639935'
|