Files
wallet/apps/mobile/.maestro/flows/explore/favorite-token.yaml
zeekay 55a7f247ca init: extract wallet from lux/exchange monorepo
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config,
utilities, sessions, gating, notifications, analytics, eslint-config,
prices) into a standalone pnpm workspace.  Resolves merge conflict
markers in extension and mobile package.json files, strips build
artifacts (.wxt, .output, Pods).
2026-04-11 01:59:19 -07:00

191 lines
4.3 KiB
YAML

appId: com.uniswap.mobile.dev
jsEngine: graaljs
tags:
- language-agnostic
env:
E2E_RECOVERY_PHRASE: ${E2E_RECOVERY_PHRASE}
DATADOG_API_KEY: ${DATADOG_API_KEY}
---
# Initialize Performance Tracking
- runScript:
file: ../../scripts/performance/dist/actions/init-tracking.js
# Start Flow Tracking
- runScript:
file: ../../scripts/performance/dist/actions/start-flow.js
env:
FLOW_NAME: 'explore-favorite-token'
# Setup: Start app, recover wallet, and navigate to explore
- runFlow: ../../shared-flows/start.yaml
- runFlow: ../../shared-flows/recover-fast.yaml
- runFlow: ../../shared-flows/navigate-to-explore.yaml
# --- Test Case: Search for and favorite a token ---
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'ExploreSearchInput'
PHASE: 'start'
# Tap on the search input field
- tapOn:
id: ${output.testIds.ExploreSearchInput}
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'ExploreSearchInput'
PHASE: 'end'
# Search for a specific token (using USDC as it's popular and should be available)
- inputText: "USDC"
# Wait for search results to load
- waitForAnimationToEnd
- extendedWaitUntil:
visible:
text: ".*USDC.*"
timeout: 5000
# Tap on the USDC token result
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'USDC_Token_Result'
PHASE: 'start'
- tapOn:
text: "USDC"
index: 1
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'USDC_Token_Result'
PHASE: 'end'
- waitForAnimationToEnd
# Assert navigation to token details page
- assertVisible:
id: ${output.testIds.TokenDetailsHeaderText}
# Wait for page to load
- waitForAnimationToEnd
# --- Test Case: Favorite the token ---
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'FavoriteToken'
PHASE: 'start'
# Tap the favorite heart icon
- tapOn:
id: 'token-details-favorite-button'
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'FavoriteToken'
PHASE: 'end'
- waitForAnimationToEnd
# Go back to explore by tapping back twice
- tapOn:
id: ${output.testIds.Back}
- extendedWaitUntil:
visible: 'noop'
timeout: 2000
optional: true
- tapOn:
id: ${output.testIds.Back}
- waitForAnimationToEnd
# Look for Favorites section header
- extendedWaitUntil:
visible:
id: ${output.testIds.FavoriteTokensHeader}
timeout: 3000
# Verify USDC appears in the favorites section
- extendedWaitUntil:
visible:
id: "${output.testIds.FavoriteTokenCardPrefix}USDC"
timeout: 3000
# --- Test Case: Unfavorite the token ---
# Tap on the favorited USDC token from the favorites section
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'USDC_From_Favorites'
PHASE: 'start'
- tapOn:
text: "USDC"
index: 0
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'USDC_From_Favorites'
PHASE: 'end'
- waitForAnimationToEnd
# Tap on the favorite button to unfavorite the token
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'UnfavoriteToken'
PHASE: 'start'
# Tap the favorite heart icon to unfavorite
- tapOn:
id: ${output.testIds.TokenDetailsFavoriteButton}
- runScript:
file: ../../scripts/performance/dist/actions/track-action.js
env:
ACTION: 'tap'
TARGET: 'UnfavoriteToken'
PHASE: 'end'
- waitForAnimationToEnd
# Go back to explore
- tapOn:
id: ${output.testIds.Back}
- waitForAnimationToEnd
# Verify USDC is no longer in favorites
- extendedWaitUntil:
notVisible:
id: "${output.testIds.FavoriteTokenCardPrefix}USDC"
timeout: 3000
# End Flow Tracking
- runScript:
file: ../../scripts/performance/dist/actions/end-flow.js
# Upload Metrics (for CI/Maestro Cloud)
- runScript:
file: ../../scripts/performance/upload-metrics.js
env:
DATADOG_API_KEY: ${DATADOG_API_KEY}
ENVIRONMENT: 'maestro_cloud'