Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions maestro/07-wallets/C000032-archive-and-restore-wallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,38 @@ tags:


# Archive wallets
- evalScript: ${var walletNames = ["My Bitcoin", "My Bitcoin Cash", "My Dash", "My Ether", "My Litecoin"]}
- evalScript: ${var index = 0}
- evalScript: ${output.walletNames = ["My Bitcoin", "My Bitcoin Cash", "My Dash", "My Ether", "My Litecoin"]}
- evalScript: ${output.index = 0}
- tapOn: Assets
- repeat:
times: ${walletNames.length - 1}
times: ${output.walletNames.length - 1}
commands:
- tapOn: ${walletNames[index]}
- tapOn: ${output.walletNames[output.index]}
- tapOn:
id: gearIcon
- tapOn: ".*Archive Wallet"
# Modal
- assertVisible: "Archive Wallet"
- assertVisible: ${"Are you sure you want to archive " + walletNames[index] + "?"}
- assertVisible: ${"Are you sure you want to archive " + output.walletNames[output.index] + "?"}
- assertVisible: Cancel
# Check if "My Ether" wallet
- runFlow:
when:
true: ${walletNames[index] == "My Ether"}
true: ${output.walletNames[output.index] == "My Ether"}
commands:
- assertVisible: "Archiving this wallet will also archive any enabled tokens for this wallet."
label: "Extra message for Ether wallets"
# Archive
- tapOn: Archive
- assertNotVisible: ${walletNames[index]}
- assertNotVisible: ${output.walletNames[output.index]}

- evalScript: ${index++}
- evalScript: ${output.index++}
label: "Archive all wallets except last"

# Unable to archive last wallet
- runFlow:
commands:
- longPressOn: ${walletNames[index]}
- longPressOn: ${output.walletNames[output.index]}
- tapOn: ".*Archive Wallet"
- assertVisible: "Cannot Archive Wallet"
- assertVisible: "At least one wallet required in this account."
Expand All @@ -80,13 +80,13 @@ tags:
- assertVisible: "Restore Wallets"

# Toggle on wallets to restore
- evalScript: ${var walletCurrencyCodes = ["BTC", "BCH", "DASH", "ETH", "LTC"]}
- evalScript: ${var index = 0}
- evalScript: ${output.walletCurrencyCodes = ["BTC", "BCH", "DASH", "ETH", "LTC"]}
- evalScript: ${output.index = 0}
- repeat:
times: ${walletCurrencyCodes.length - 1}
times: ${output.walletCurrencyCodes.length - 1}
commands:
- tapOn: ${walletCurrencyCodes[index]}
- evalScript: ${index++}
- tapOn: ${output.walletCurrencyCodes[output.index]}
- evalScript: ${output.index++}
- tapOn: Restore

# Modal
Expand All @@ -97,14 +97,14 @@ tags:

# Confirm restored and returned to assets screen
- assertVisible: "Total Balance.*"
- evalScript: ${var index = 0}
- evalScript: ${output.index = 0}
- repeat:
times: ${walletNames.length}
times: ${output.walletNames.length}
commands:
- scrollUntilVisible:
element: ${walletNames[index]}
element: ${output.walletNames[output.index]}
direction: DOWN
- evalScript: ${index++}
- evalScript: ${output.index++}

# Ensure restore is not tappable when none left to restore
- tapOn:
Expand Down
16 changes: 8 additions & 8 deletions maestro/07-wallets/C000036-autodetect-all-networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tags:
# All networks that support tokens (and import seed)
# EVMs: Only Sonic and Pulsechain (others tested via regular asset sync)
- evalScript: ${
var wallets = '[
output.wallets = '[
"Coreum",
"Osmosis",
"Avalanche",
Expand All @@ -40,7 +40,7 @@ tags:
- runFlow:
file: ../common/import-wallets.yaml
env:
ASSET_NAMES: ${wallets}
ASSET_NAMES: ${output.wallets}
# label: "Import wallets"

- runFlow:
Expand All @@ -54,7 +54,7 @@ tags:

# Tokens matching the imported networks
- evalScript: ${
var tokens = [
output.tokens = [
"ATOM",
"JOE",
"PYTH",
Expand Down Expand Up @@ -94,17 +94,17 @@ tags:
# visible: ${".*New tokens were detected and enabled on " + WALLET_NAME + ".*"}
# timeout: 60000

- evalScript: ${var index = 0}
- evalScript: ${output.index = 0}
- repeat:
times: ${tokens.length}
times: ${output.tokens.length}
commands:
- scrollUntilVisible:
element: ${tokens[index]}
element: ${output.tokens[output.index]}
direction: UP
timeout: 20000
optional: true
- scrollUntilVisible:
element: ${tokens[index]}
element: ${output.tokens[output.index]}
direction: DOWN
timeout: 90000
- scrollUntilVisible:
Expand All @@ -114,7 +114,7 @@ tags:
timeout: 10000
optional: true
label: "Scroll to bottom."
- evalScript: ${index++}
- evalScript: ${output.index++}



Expand Down
6 changes: 3 additions & 3 deletions maestro/07-wallets/C000037-split-wallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ tags:
- assertVisible: Split Wallet
- assertVisible: This action creates wallets from pre-existing wallets.
- assertVisible: Tap on wallet to edit name
- evalScript: ${var newETHName = ".*My Ether \\(Split from My Base\\).*"}
- assertVisible: ${newETHName}
- evalScript: ${output.newETHName = ".*My Ether \\(Split from My Base\\).*"}
- assertVisible: ${output.newETHName}

# Rename modal
- tapOn:
Expand Down Expand Up @@ -109,7 +109,7 @@ tags:
## Verify new wallets and balances
# ETH recovered
- scrollUntilVisible:
element: ${newETHName}
element: ${output.newETHName}
direction: DOWN
centerElement: true
timeout: 10000
Expand Down
20 changes: 10 additions & 10 deletions maestro/07-wallets/C000043-private-view-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ tags:
# Monero/Zano (CryptoNote): 64-char hex
# Zcash/Pirate (zk-SNARKs): longer alphanumeric strings
- evalScript: ${
var walletFormats = {
output.walletFormats = {
"Monero":"[a-fA-F0-9]{64}",
"Pirate Chain":"[a-zA-Z0-9]{64,}",
"Zcash":"[a-zA-Z0-9]{64,}",
"Zano":"[a-fA-F0-9]{64}"
}
}
- evalScript: ${var walletNames = Object.keys(walletFormats)}
- evalScript: ${output.walletNames = Object.keys(output.walletFormats)}

# Create account with wallets that support private view key
- runFlow:
file: ../common/create-account.yaml
env:
NEW_WALLETS: ${JSON.stringify(walletNames)}
NEW_WALLETS: ${JSON.stringify(output.walletNames)}
label: "Add wallets with private view key support"

- runFlow:
Expand All @@ -43,17 +43,17 @@ tags:
- tapOn: Assets

# Loop over each wallet and test Private View Key
- evalScript: ${var index = 0}
- evalScript: ${output.index = 0}
- repeat:
times: ${walletNames.length}
times: ${output.walletNames.length}
commands:
# Wallet nickname often excludes extra words (e.g. "Pirate Chain" -> "Pirate")
- evalScript: ${var nickName = "My " + walletNames[index].split(" ")[0]}
- evalScript: ${output.nickName = "My " + output.walletNames[output.index].split(" ")[0]}
- scrollUntilVisible:
element: ${nickName}
element: ${output.nickName}
direction: DOWN
centerElement: true
- longPressOn: ${nickName}
- longPressOn: ${output.nickName}
- assertVisible: ".*Private View Key"
- tapOn: ".*Private View Key"
# Private View Key Modal
Expand All @@ -63,9 +63,9 @@ tags:
- assertVisible: "Copy"
# Validate view key format for this network
- assertVisible:
text: ${walletFormats[walletNames[index]]}
text: ${output.walletFormats[output.walletNames[output.index]]}
- tapOn:
id: "modal-close-button"
- evalScript: ${index++}
- evalScript: ${output.index++}

# - stopApp
14 changes: 7 additions & 7 deletions maestro/07-wallets/C000044-create-all-wallet-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ tags:
file: ../common/no-errors.yaml

# Validate that all wallets were created
- evalScript: ${var index = 0}
- evalScript: ${var walletNames = JSON.parse(output.assetNames)}
- evalScript: ${output.index = 0}
- evalScript: ${output.walletNames = JSON.parse(output.assetNames)}
- repeat:
times: ${walletNames.length}
times: ${output.walletNames.length}
commands:
# option 1
# Preferred quicker method, but iOS wallet search is not currently reliable when maestro types too fast
Expand All @@ -45,9 +45,9 @@ tags:

# Option 2
# Wallet nickname often excludes extra words (e.g. "Pirate Chain" -> "My Pirate")
- evalScript: ${var nickName = "My " + walletNames[index].split(" ")[0] + ".*"}
- evalScript: ${output.nickName = "My " + output.walletNames[output.index].split(" ")[0] + ".*"}
# Hack to address inconsistent wallet name for XRP
- evalScript: ${if (walletNames[index] === "XRPL") { nickName = "My XRP"}}
- evalScript: ${if (output.walletNames[output.index] === "XRPL") { output.nickName = "My XRP"}}
- retry:
maxRetries: 2
commands:
Expand All @@ -57,9 +57,9 @@ tags:
speed: 150
timeout: 30000
- scrollUntilVisible:
element: ${nickName}
element: ${output.nickName}
centerElement: true
timeout: 60000
speed: 5

- evalScript: ${index++}
- evalScript: ${output.index++}
6 changes: 3 additions & 3 deletions maestro/07-wallets/C000046-rename-wallet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ tags:
# Copy new name and save
- copyTextFrom:
id: "undefined.textInput"
- evalScript: ${var newWalletName = maestro.copiedText}
- evalScript: ${output.newWalletName = maestro.copiedText}
- tapOn: Submit

- assertVisible: ${newWalletName}
- assertVisible: ${output.newWalletName}
# Arbitrary wait to ensure wallet state is saved to sync server (~30 seconds)
- extendedWaitUntil:
visible: ${WALLET_NAME}
Expand All @@ -54,4 +54,4 @@ tags:
file: ../common/dismiss-modals.yaml

- tapOn: Assets
- assertVisible: ${newWalletName}
- assertVisible: ${output.newWalletName}
13 changes: 6 additions & 7 deletions maestro/07-wallets/C000048-split-all-evm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tags:

# Define expected EVM networks (ordered by appearance)
- evalScript: |
${var evmNetworks = [
${output.evmNetworks = [
"zkSync",
"Optimism",
"Ethereum Classic",
Expand All @@ -62,9 +62,9 @@ tags:
]}

# Loop over each network and scroll until visible
- evalScript: ${var index = 0}
- evalScript: ${output.index = 0}
- repeat:
times: ${evmNetworks.length}
times: ${output.evmNetworks.length}
commands:
# # Once search can accomodate multiple words
# # Search is slower but more reliable
Expand All @@ -82,15 +82,15 @@ tags:
maxRetries: 2
commands:
- scrollUntilVisible:
element: ${".*" + evmNetworks[index]}
element: ${".*" + output.evmNetworks[output.index]}
direction: DOWN
centerElement: true
speed: 1
timeout: 1000
optional: true
- tapOn: ${".*" + evmNetworks[index]}
- tapOn: ${".*" + output.evmNetworks[output.index]}

- evalScript: ${index++}
- evalScript: ${output.index++}

- tapOn: Next

Expand All @@ -108,4 +108,3 @@ tags:


- stopApp

14 changes: 7 additions & 7 deletions maestro/common/add-wallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ appId: ${MAESTRO_APP_ID}
env:
ASSET_NAMES: ${ASSET_NAMES || ""}
---
# Parse if an array/list- all passed env become strings with maestro's Rhino JS runtime
- evalScript: ${if (ASSET_NAMES.startsWith('[')) ASSET_NAMES = JSON.parse(ASSET_NAMES); else ASSET_NAMES = [ASSET_NAMES]}
# Parse if an array/list; all passed env values become strings
- evalScript: '${output.ASSET_NAMES = ASSET_NAMES.startsWith("[") ? JSON.parse(ASSET_NAMES) : [ASSET_NAMES]}'

- tapOn: Assets
- tapOn:
id: "addButton"
- tapOn: Search Wallets

# Loop over wallet names and add them
- evalScript: ${var index = 0}
- evalScript: ${output.index = 0}
- repeat:
times: ${ASSET_NAMES.length}
times: ${output.ASSET_NAMES.length}
commands:
- tapOn:
id: "undefined.clearIcon"
- inputText: ${ASSET_NAMES[index]}
- inputText: ${output.ASSET_NAMES[output.index]}
- tapOn:
text: ${".*" + ASSET_NAMES[index]}
text: ${".*" + output.ASSET_NAMES[output.index]}
index: 1 # First index is thesearch bar
- evalScript: ${index++}
- evalScript: ${output.index++}

- tapOn: Next

Expand Down
Loading