Files
Daniel DimitrovandGitHub 0c83c9f941 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

43 lines
1.3 KiB
YAML

appId: ${APP_ID}
tags:
- util
---
# ===========================================
# Confirmations (Reusable Component)
# ===========================================
# Tests tapping on confirmations to open the bottom sheet
# and verifies that signed badges are displayed
#
# This component should be called from the "Confirm transaction" screen
# where the confirmations list item is visible
#
# Environment variables:
# CONFIRMATIONS_PATTERN: Optional regex pattern to verify confirmations count
# Example: ".*1/1.*" or ".*2/3.*"
# Defaults to ".*\d+/\d+.*" to match any confirmation format
- assertVisible: 'Confirmations'
# Verify confirmations pattern if provided
- assertVisible:
text: '${CONFIRMATIONS_PATTERN || ".*\\d+/\\d+.*"}'
# Tap on the confirmations list item to open the bottom sheet
- tapOn:
id: 'confirmations-info-list-item'
# Verify the bottom sheet opens with "Confirmations" title
- assertVisible: 'Confirmations'
# Verify that at least one "Signed" badge is visible in the sheet
- assertVisible:
id: 'confirmations-sheet-signer-status-text'
text: 'Signed'
# Dismiss the bottom sheet by swiping down
- swipe:
direction: 'DOWN'
# Verify we're back on the confirm transaction screen
- assertVisible: 'Confirm transaction'