Files
zapstore/maestro/flows/setup_amber_test_account.yaml
T
Henrique Velloso 4fd2fc05fc Update version number and refine visibility checks in Maestro flows
- Incremented app version in `pubspec.yaml` from 1.0.0+1000 to 1.0.0+3000.
- Replaced `extendedWaitUntil` with `assertVisible` in multiple Maestro flow files to streamline visibility checks and improve readability.
- Added a new flow `check_signed_in_test_account.yaml` to verify if the app is already signed in with the test account, enhancing the automated testing process.
2026-02-18 23:09:17 -03:00

90 lines
2.8 KiB
YAML

appId: com.greenart7c3.nostrsigner
---
# =============================================================
# Sub-flow: Ensure test account is active in Amber
#
# Handles three scenarios:
# A) Amber main screen ("Applications") → open Accounts tab
# B) Fresh Amber (onboarding) → import from nsec directly
# C) Already on account selector → pick or import
#
# Test account npub (truncated): npub1lhr
#
# Environment variable required:
# NOSTR_TEST_NSEC — the nsec to import
#
# Prerequisites:
# - Amber signer app installed on the device
# - Device language set to English
# =============================================================
# Wait for Amber to load (main screen or onboarding)
- assertVisible:
text: "(?:Applications|Use your private key|Select Account)"
# ─── Scenario A: main screen with accounts (title = "Applications") ───
- runFlow:
when:
visible: "Applications"
commands:
- tapOn:
text: "Accounts"
label: "Tap Accounts bottom tab"
- assertVisible: "Select Account"
# Import test account if not present
- runFlow:
when:
notVisible: "npub1lhr"
commands:
- tapOn: "Add New Account"
- assertVisible: "Use your private key"
- tapOn: "Use your private key"
- assertVisible: "Nsec / private key"
- tapOn:
text: "Nsec / private key"
label: "Tap nsec input field"
- inputText: "${NOSTR_TEST_NSEC}"
- tapOn: "Next"
- assertVisible: "Finish"
- tapOn: "Finish"
- assertVisible:
text: "(?:Allow Amber|Applications)"
- runFlow:
when:
visible: "Allow"
commands:
- tapOn: "Allow"
- assertVisible: "Applications"
# If account sheet is still open (account existed), select it
- runFlow:
when:
visible: "Select Account"
commands:
- tapOn:
text: "npub1lhr"
label: "Select test account"
- pressKey: back
# ─── Scenario B: fresh Amber onboarding ───
- runFlow:
when:
visible: "Use your private key"
commands:
- tapOn: "Use your private key"
- assertVisible: "Nsec / private key"
- tapOn:
text: "Nsec / private key"
label: "Tap nsec input field"
- inputText: "${NOSTR_TEST_NSEC}"
- tapOn: "Next"
- assertVisible: "Finish"
- tapOn: "Finish"
- assertVisible:
text: "(?:Allow Amber|Applications)"
- runFlow:
when:
visible: "Allow"
commands:
- tapOn: "Allow"
- assertVisible: "Applications"