feat(rn_cli_wallet): Maestro E2E tests for payment edge cases#457
feat(rn_cli_wallet): Maestro E2E tests for payment edge cases#457ignaciosantise merged 5 commits intomainfrom
Conversation
…iew testIDs Add new Maestro tests for insufficient funds, double-scan, expired link, and cancelled payment flows. Refactor shared flows to decouple merchant-info wait from open/paste steps, making flows reusable for error scenarios. Add specific testIDs and accessibility labels to ResultView icons for reliable E2E assertions without string dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add minimatch v5 resolution for eslint-plugin-react to fix "minimatch is not a function" error caused by minimatch v9 ESM exports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ignaciosantise's task in 2s —— View job PR Review
Found 1 issue(s)Issue 1: Hardcoded payment IDs will become stale test fixturesID: pay-cancelled-hardcoded-pid-a3f1 Context:
Recommendation: Document a procedure for refreshing these IDs (or add a comment with the creation steps), and consider whether # pay_cancelled.yaml
- evalScript: ${output.gateway_url = WPAY_CANCELLED_PAYMENT_URL}This avoids hardcoding while keeping the zero-API-call approach for these static states. Subagent findings:
|
There was a problem hiding this comment.
Pull request overview
This PR adds new Maestro end-to-end tests for WalletConnect Pay error/edge-case flows in rn_cli_wallet, refactors shared Maestro flows so tests can control their own waits, and updates UI identifiers to make result-screen assertions more reliable. It also adjusts the Maestro payment creation script to allow custom amounts, and updates ESLint-related dependencies/resolutions.
Changes:
- Added 4 new Maestro E2E tests covering insufficient funds, double-scan, expired link, and cancelled payment flows.
- Refactored shared Maestro “open payment” flows to remove embedded merchant-info waits; updated existing pay tests to add explicit waits where needed.
- Added additional
testIDs for result icons; extended Maestro payment creation script to acceptWPAY_AMOUNT; updated ESLint deps/resolutions.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| wallets/rn_cli_wallet/package.json | Adds ESLint plugin deps and a selective resolutions override for eslint-plugin-react’s minimatch. |
| wallets/rn_cli_wallet/yarn.lock | Lockfile updates reflecting new ESLint plugin deps and added minimatch@5.1.6. |
| wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/ResultView.tsx | Adds testIDs for error-state result icons to support Maestro assertions. |
| .maestro/scripts/create-payment.js | Adds optional WPAY_AMOUNT support when creating payments via API. |
| .maestro/flows/pay_open_and_paste_url.yaml | Removes embedded wait for merchant info so callers decide what to wait for. |
| .maestro/flows/pay_open_via_deeplink.yaml | Removes embedded wait for merchant info so callers decide what to wait for. |
| .maestro/pay_single_option_nokyc.yaml | Adds explicit wait for pay-merchant-info after opening/pasting URL. |
| .maestro/pay_single_option_nokyc_deeplink.yaml | Adds explicit wait for pay-merchant-info after opening deep link. |
| .maestro/pay_multiple_options_nokyc.yaml | Adds explicit wait for pay-merchant-info after opening/pasting URL. |
| .maestro/pay_multiple_options_kyc.yaml | Adds explicit wait for pay-merchant-info after opening/pasting URL. |
| .maestro/pay_insufficient_funds.yaml | New Maestro test validating insufficient-funds result screen and icon. |
| .maestro/pay_expired_link.yaml | New Maestro test validating expired-payment result screen and icon. |
| .maestro/pay_double_scan.yaml | New Maestro test that completes a payment, then re-submits the same URL and asserts an error result. |
| .maestro/pay_cancelled.yaml | New Maestro test validating cancelled-payment result screen and icon. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove eslint-plugin-react direct dep (minimatch resolution suffices). Pin eslint-plugin-ft-flow to ^2.0.1 for @react-native/eslint-config compat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Maestro on Android doesn't reliably match combined id + text selectors in assertVisible. Split into assertVisible by id + copyTextFrom/assertTrue for button text verification, matching the pattern used in existing tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Result button testID now encodes state: pay-button-result-action-{success|errorType}
- Extract getResultButtonTestId and getActionButtonText utils in ResultView
- Remove fragile text assertions from error tests (id suffices)
- Add retry tap on "Add" in KYC test for slow webview
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
pay-merchant-infowait frompay_open_and_paste_urlandpay_open_via_deeplinkso each test controls its own wait — enabling reuse for error scenarios that skip the merchant info screennativeIDandaccessibilityLabelto result icons (pay-result-success-icon,pay-result-insufficient-funds-icon,pay-result-error-icon,pay-result-expired-icon,pay-result-cancelled-icon) for reliable assertions without string dependenciescreate-payment.js: supports optionalWPAY_AMOUNTenv var for custom payment amounts (defaults to1)minimatch is not a functionerror by pinningeslint-plugin-react/minimatchto v5graph TD A[create-payment.js] -->|gateway_url| B[pay_open_and_paste_url] A -->|gateway_url| C[pay_open_via_deeplink] B --> D[pay_single_option_nokyc] B --> E[pay_multiple_options_nokyc] B --> F[pay_multiple_options_kyc] C --> G[pay_single_option_nokyc_deeplink] B --> H[pay_insufficient_funds 🆕] B --> I[pay_double_scan 🆕] B --> J[pay_expired_link 🆕] B --> K[pay_cancelled 🆕] style H fill:#f96,stroke:#333 style I fill:#f96,stroke:#333 style J fill:#f96,stroke:#333 style K fill:#f96,stroke:#333Test plan
maestro test .maestro/pay_insufficient_funds.yaml— verify "Not enough funds" error screenmaestro test .maestro/pay_double_scan.yaml— verify rejection on second scanmaestro test .maestro/pay_expired_link.yaml— verify "Your payment has expired" screenmaestro test .maestro/pay_cancelled.yaml— verify "This payment was cancelled" screenyarn lintpasses inrn_cli_wallet🤖 Generated with Claude Code