Files
Daniel DimitrovandGitHub ac164e7f48 test(mobile): refactor the e2e tests (#6642)
* fix(mobile): infoSheet loses content

* test(mobile): refactor e2e tests

Reorganise the e2e test and make them easier to maintain. The previous structure was monotlithic. One would start the history tests and would have to wait for all of them to complete. Now one can test individual features - like twap, swap, stake txs without having the run the whole flow. Each of those can be run on it’s own. They can also be run as a whole in the __suite__ - every suite is optimised to start the app once and then to run flow without uninstalling and instalilng the app again.

* test(mobile): run tests on android as well

* test(mobile): fix wrong mock data

* fix(mobile): linting

* test(mobile): make assertions android compatible

* fix(mobile): prettier

* test(mobile): add stake claim test

* test(mobile): speed up app launch in dev mode

* test(mobile): test improvements

* test(mobile): unstable hooks caused app to crash

There was somethign wrong with AssetsNavbar and the way that react-navigation renders it. In tests we got crashes due to different number of hooks being rendered

* test(mobile): fix prettier
2025-11-14 18:02:10 +01:00

52 lines
1.6 KiB
YAML

appId: ${APP_ID}
tags:
- util
---
- runScript:
file: ../../utils/scripts/defaults.js
# ===========================================
# Actions List View (Reusable Component)
# ===========================================
# Tests the actions list view for transactions that have multiple actions
# Can be used for both history transactions and pending transactions
#
# This component assumes you're already on the "Actions" screen
# Call this after tapping on "Actions" from either:
# - Transaction details screen (history)
# - Confirm transaction screen (pending)
- assertVisible: 'Actions'
# Verify action items are visible as containers/cards
# Actions are displayed in containers that can be tapped
# Each action shows: number, description like "Send X ETH to", address
- extendedWaitUntil:
visible:
text: '.*\d+.*'
optional: true
timeout: ${output.defaults.extendedWaitUntilTimeout}
# Verify action descriptions are visible
# Format: "Send 0.01 ETH to" or "Send 0.05 ETH to" or "approve" or "setPreSignature"
- extendedWaitUntil:
visible:
text: '.*(Send|approve|setPreSignature).*'
optional: true
timeout: ${output.defaults.extendedWaitUntilTimeout}
# Verify addresses are visible in action items (if applicable)
- extendedWaitUntil:
visible:
text: '0x[0-9a-fA-F]{4}.*[0-9a-fA-F]{4}'
optional: true
timeout: ${output.defaults.extendedWaitUntilTimeout}
# Click on the first action item (Container is clickable)
# We'll tap on the action text/description
- tapOn:
id: 'tx-action-item-0'
# Test clicking on individual action items
- runFlow:
file: ./verify-action-detail.yml