mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* 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
118 lines
3.9 KiB
YAML
118 lines
3.9 KiB
YAML
appId: ${APP_ID}
|
|
tags:
|
|
- util
|
|
jsEngine: graaljs
|
|
---
|
|
- runScript:
|
|
file: ../../../utils/scripts/defaults.js
|
|
# ===========================================
|
|
# Conflicting Transactions Card
|
|
# ===========================================
|
|
# Tests the conflicting transactions card display
|
|
# The card should show a warning banner and list of conflicting transactions
|
|
#
|
|
# Environment variables:
|
|
# TX_TYPES: Comma-separated list of transaction types to verify (required)
|
|
# Example: "Send,Settings change,Contract interaction"
|
|
# TX_DETAILS: Comma-separated list of transaction details/amounts to verify (optional)
|
|
# Example: "0.00002 ETH,addOwnerWithThreshold,someMethod"
|
|
# Must match the number and order of TX_TYPES
|
|
# CONFIRMATIONS_PATTERN: Regex pattern for confirmations to verify (optional)
|
|
# Defaults to '.*\d+/\d+.*' to match any confirmation format
|
|
#
|
|
# Note: This flow uses GraalJS for modern JavaScript features to parse comma-separated values
|
|
|
|
- assertVisible:
|
|
text: '.*Conflicting transactions.*'
|
|
|
|
# Parse TX_TYPES into an array using GraalJS
|
|
- evalScript: "${output.txTypes = (typeof TX_TYPES !== 'undefined' && TX_TYPES) ? TX_TYPES.split(',').map(function(t) { return t.trim(); }) : []}"
|
|
|
|
# Parse TX_DETAILS into an array if provided
|
|
- evalScript: "${output.txDetails = (typeof TX_DETAILS !== 'undefined' && TX_DETAILS) ? TX_DETAILS.split(',').map(function(d) { return d.trim(); }) : []}"
|
|
|
|
# The empty string fallback (|| "") ensures assertions with missing array items don't fail
|
|
# Only provided transaction types/details will be validated
|
|
|
|
# Verify each transaction type is visible
|
|
# You can add up to 5 transactions
|
|
# Note: Since Maestro doesn't support JS expressions in optional, we make all optional: true
|
|
# The empty string fallback ensures assertions don't fail when items don't exist
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[0] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[1] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[2] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[3] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[4] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txTypes[5] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
# Verify transaction details if provided (optional, matches corresponding TX_TYPES index)
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[0] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[1] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[2] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[3] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[4] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: '.*${output.txDetails[5] || ""}.*'
|
|
optional: true
|
|
timeout: ${output.defaults.extendedWaitUntilTimeout}
|
|
|
|
# Verify confirmations are shown
|
|
# Use provided pattern or default to any confirmation format
|
|
- assertVisible:
|
|
text: '${CONFIRMATIONS_PATTERN || ".*\\d+/\\d+.*"}'
|