Files
74354b0d0e fix(mobile): fix e2e positions test and stabilize tab test IDs (#7366)
* fix(mobile): fix e2e positions test and stabilize tab test IDs

- Add explicit testIDs to SafeTab items (tokens-tab, positions-tab, nfts-tab)
  so tests don't break when the positions tab is conditionally shown
- Use react-native-gesture-handler Pressable in ProtocolSection to fix
  tap not registering inside collapsible tab scroll view
- Add accessible={false} to gorhom BottomSheet so children are visible
  in the accessibility tree for Maestro
- Refactor Navbar to use DropdownLabel component, restoring the
  dropdown-label-view testID that e2e tests depend on
- Update e2e tests to use the new stable tab testIDs

* fix(mobile): prettier

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-03-09 12:18:44 +01:00

135 lines
2.7 KiB
YAML

appId: ${APP_ID}
tags:
- assets
- smoke
---
- runScript:
file: ../../utils/scripts/defaults.js
- runFlow:
file: ../../utils/setup/app-start.yml
- tapOn:
id: 'e2eOnboardedAccountTestAssets'
# Test Home tab / Assets default view
- assertVisible:
id: 'home-tab'
- assertVisible:
id: 'fiat-balance-symbol'
text: '.*\$.*'
# Test Tokens Tab - Default view
- assertVisible:
id: 'tokens-tab'
# Verify native token appears in the list
- assertVisible:
text: '.*\d+\.?\d*\s*ETH.*'
# Verify manage tokens button is visible
- assertVisible:
id: 'manage-tokens-button'
# Verify token symbols and balances are visible
- assertVisible:
text: '.*\d+\.\d+.*'
# Verify token fiat symbol is visible
- assertVisible:
id: 'token-ETH-fiat-balance'
text: '.*\$.*'
# Switch to NFTs Tab
- tapOn:
text: 'NFTs'
# Verify NFTs tab content appears
- assertVisible:
id: 'nfts-tab'
# Verify NFT is visible and there are no NFTs
- assertVisible:
text: '(?i)(No NFTs).*'
# Return to Tokens Tab
- tapOn:
text: 'Tokens'
# Verify token list is preserved when switching back
- assertVisible:
id: 'tokens-tab'
# Verify manage tokens button is still visible
- assertVisible:
id: 'manage-tokens-button'
# Open Manage Tokens Sheet
- tapOn:
id: 'manage-tokens-button'
# Verify sheet slides up from bottom
# Look for sheet title
- assertVisible:
text: 'Manage tokens'
# Verify "hide suspicious tokens" toggle appears
- assertVisible:
id: 'toggle-show-all-tokens'
# Verify description text appears
- assertVisible:
text: 'Choose which tokens to display in your assets list.*'
# Test toggling the suspicious tokens filter
- tapOn:
id: 'toggle-show-all-tokens'
# Tap outside or dismiss the sheet by swiping down
- swipe:
direction: 'DOWN'
startPoint: '50%,50%'
endPoint: '50%,80%'
# Verify we're back to the tokens list
- assertVisible:
id: 'tokens-tab'
# Test completed successfully - Safe1
# ============================================
# Switch to Safe2 and verify NFTs are loaded
# ============================================
# Tap on the dropdown to switch safes
- tapOn:
id: 'dropdown-label-view'
index: 0
# Select Safe2 from the dropdown
- tapOn:
text: '.*Safe2.*'
index: 0
# Verify we're on Safe2 by checking the balance displays
- assertVisible:
id: 'home-tab'
# Navigate to NFTs Tab
- tapOn:
text: 'NFTs'
# Verify NFTs tab content appears for Safe2
- assertVisible:
id: 'nfts-tab'
# Verify NFTs are loaded (not the empty state)
# Safe2 should have NFTs, so we check for NFT items or collection names
- assertVisible:
text: '(?i)(NFT|Collectible|#\d+).*'
- assertVisible: 'CatFactory #1'
# Test completed successfully - Safe2 NFTs verified