Skip to content

Add mobile Maestro e2e scaffolding#953

Merged
wheval merged 1 commit into
ancore-org:mainfrom
olalois:chore/mobile-maestro-e2e-scaffolding
Jul 5, 2026
Merged

Add mobile Maestro e2e scaffolding#953
wheval merged 1 commit into
ancore-org:mainfrom
olalois:chore/mobile-maestro-e2e-scaffolding

Conversation

@olalois

@olalois olalois commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Maestro flow specs for create/import/send/lock-unlock
  • add mobile e2e setup docs and environment guidance
  • add a manual-only CI workflow for mobile Maestro flows

Closes #786

Summary by CodeRabbit

  • New Features

    • Added scaffolded mobile wallet end-to-end test flows for creating a wallet, importing a wallet, locking/unlocking, and sending a payment.
    • Added a mobile test runner setup so these flows can be launched consistently.
  • Documentation

    • Added setup and usage instructions for running mobile end-to-end tests locally.
    • Included required environment variables, test account funding guidance, and CI availability notes.

@drips-wave

drips-wave Bot commented Jul 1, 2026

Copy link
Copy Markdown

@olalois Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds Maestro end-to-end test infrastructure for the mobile wallet app: a Maestro configuration file, four YAML flow specs (create-wallet, import-wallet, lock-unlock, send-payment), a manual-trigger CI workflow placeholder, and setup documentation covering env vars and run instructions.

Changes

Mobile Maestro E2E scaffolding

Layer / File(s) Summary
Maestro configuration
apps/mobile-wallet/maestro.config.yaml
Defines appId, flow set name, and points Maestro to e2e/flows.
E2E flow specs
apps/mobile-wallet/e2e/flows/create-wallet.yaml, apps/mobile-wallet/e2e/flows/import-wallet.yaml, apps/mobile-wallet/e2e/flows/lock-unlock.yaml, apps/mobile-wallet/e2e/flows/send-payment.yaml
Adds create/import/lock-unlock/send-payment UI interaction flows using E2E_* env vars, with TODO comments gating create/import/send flows on issues #783 and #785.
CI workflow and setup docs
.github/workflows/mobile-e2e.yml, docs/testing/mobile-e2e-setup.md
Adds a manual workflow_dispatch CI job that prints a scaffolding status message, plus documentation of prerequisites, env vars, testnet faucet, and run commands.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Maestro
  participant WalletApp
  Maestro->>WalletApp: launchApp
  Maestro->>WalletApp: Create/Import wallet steps
  WalletApp-->>Maestro: Assert wallet setup complete
  Maestro->>WalletApp: Unlock with E2E_TEST_PASSWORD
  WalletApp-->>Maestro: Assert Account screen
  Maestro->>WalletApp: Send payment to E2E_RECIPIENT_ADDRESS
  WalletApp-->>Maestro: Assert Transaction hash
Loading

Related issues: #786 (Mobile: Maestro e2e flows for create wallet, import, and send)

Related PRs: None identified

Suggested labels: mobile, testing, ci

Suggested reviewers: None identified

🐰 Hopping through flows, one tap at a time,
Create, unlock, send — each step in rhyme,
Maestro waits, gated by TODO,
Till onboarding and sending are ready to go.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding mobile Maestro e2e scaffolding.
Linked Issues check ✅ Passed The PR adds all four Maestro flows, setup docs, config, and a manual workflow, matching the linked issue requirements.
Out of Scope Changes check ✅ Passed The changes stay within the requested mobile Maestro e2e scaffolding, documentation, and placeholder CI setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/mobile-wallet/e2e/flows/create-wallet.yaml (1)

4-4: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Flow assumes fresh app state without explicit reset.

launchApp doesn't guarantee a clean/unonboarded state by default; if this flow runs after import-wallet.yaml (or a prior run) in the same session/device, "Create a new wallet" may not be visible, causing a flaky failure. Consider using launchApp: { clearState: true } (verify exact Maestro syntax) to ensure a deterministic starting state.

♻️ Suggested reset guard
 appId: org.ancore.wallet.dev
 ---
 # TODO: requires `#783` (mobile-wire-onboarding) — enable in CI after that ships
-- launchApp
+- launchApp:
+    clearState: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile-wallet/e2e/flows/create-wallet.yaml` at line 4, The create-wallet
flow currently starts with a plain launchApp, which can inherit a previously
onboarded app state and make the “Create a new wallet” screen flaky. Update the
flow to use the appropriate Maestro app reset option at startup (for example,
launchApp with clearState enabled, if supported) so create-wallet.yaml always
begins from a clean, deterministic state.
apps/mobile-wallet/e2e/flows/lock-unlock.yaml (1)

3-4: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

Flow has no setup step to guarantee an existing, onboarded wallet.

This flow launches the app and immediately expects "Unlock Wallet" to be visible, implicitly depending on a wallet already being created/imported from a prior flow run. Maestro flows are typically run independently, so this precondition isn't guaranteed — the flow will fail if run standalone or before create-wallet/import-wallet. Consider chaining a setup step (e.g., runFlow: import-wallet.yaml) or documenting the required precondition/ordering explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/mobile-wallet/e2e/flows/lock-unlock.yaml` around lines 3 - 4, The
lock-unlock Maestro flow assumes a pre-existing onboarded wallet because it goes
straight from launching the app to tapping “Unlock Wallet.” Update the flow to
either set up the wallet first by chaining a setup flow such as
import-wallet.yaml (or create-wallet.yaml) before the unlock step, or explicitly
document the required precondition/order for lock-unlock so it can run reliably.
Use the lock-unlock.yaml flow and its launchApp/tapOn sequence as the place to
add the dependency.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/mobile-e2e.yml:
- Around line 11-12: The Checkout repository step in the mobile-e2e workflow is
leaving the GitHub token persisted in git config; update the actions/checkout@v4
usage to disable credential persistence. Modify the checkout configuration for
that step to set persist-credentials to false so the token is not retained for
the rest of the job.

---

Nitpick comments:
In `@apps/mobile-wallet/e2e/flows/create-wallet.yaml`:
- Line 4: The create-wallet flow currently starts with a plain launchApp, which
can inherit a previously onboarded app state and make the “Create a new wallet”
screen flaky. Update the flow to use the appropriate Maestro app reset option at
startup (for example, launchApp with clearState enabled, if supported) so
create-wallet.yaml always begins from a clean, deterministic state.

In `@apps/mobile-wallet/e2e/flows/lock-unlock.yaml`:
- Around line 3-4: The lock-unlock Maestro flow assumes a pre-existing onboarded
wallet because it goes straight from launching the app to tapping “Unlock
Wallet.” Update the flow to either set up the wallet first by chaining a setup
flow such as import-wallet.yaml (or create-wallet.yaml) before the unlock step,
or explicitly document the required precondition/order for lock-unlock so it can
run reliably. Use the lock-unlock.yaml flow and its launchApp/tapOn sequence as
the place to add the dependency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af4be9e2-2708-495e-bf91-77c4b766d5b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4867ec0 and 3916c3e.

📒 Files selected for processing (7)
  • .github/workflows/mobile-e2e.yml
  • apps/mobile-wallet/e2e/flows/create-wallet.yaml
  • apps/mobile-wallet/e2e/flows/import-wallet.yaml
  • apps/mobile-wallet/e2e/flows/lock-unlock.yaml
  • apps/mobile-wallet/e2e/flows/send-payment.yaml
  • apps/mobile-wallet/maestro.config.yaml
  • docs/testing/mobile-e2e-setup.md

Comment on lines +11 to +12
- name: Checkout repository
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Disable credential persistence on checkout.

Static analysis flags this checkout step for not setting persist-credentials: false, leaving the GitHub token persisted in the git config for the remainder of the job.

🔒 Proposed fix
       - name: Checkout repository
         uses: actions/checkout@v4
+        with:
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 11-12: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/mobile-e2e.yml around lines 11 - 12, The Checkout
repository step in the mobile-e2e workflow is leaving the GitHub token persisted
in git config; update the actions/checkout@v4 usage to disable credential
persistence. Modify the checkout configuration for that step to set
persist-credentials to false so the token is not retained for the rest of the
job.

Source: Linters/SAST tools

@wheval
wheval merged commit df95bd4 into ancore-org:main Jul 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile: Maestro e2e flows for create wallet, import, and send

2 participants