Skip to content

feat(rn_cli_wallet): refactor Maestro Pay E2E tests with inline payment creation#455

Open
ignaciosantise wants to merge 7 commits intomainfrom
feat/maestro-pay-tests
Open

feat(rn_cli_wallet): refactor Maestro Pay E2E tests with inline payment creation#455
ignaciosantise wants to merge 7 commits intomainfrom
feat/maestro-pay-tests

Conversation

@ignaciosantise
Copy link
Copy Markdown
Collaborator

Summary

  • Refactored Maestro Pay E2E tests to create payments inline via JS scripts instead of a pre-step shell script, enabling per-test merchant/customer key configuration
  • Added separate test orchestrations for single-option (no KYC), multi-option (KYC & no KYC), and deeplink Pay flows
  • Added reusable sub-flows (pay_open_and_paste_url, pay_open_via_deeplink, pay_confirm_and_verify) to reduce duplication
  • Added testID props to ActionButton, Button, SelectOptionView, ReviewPaymentView, and ScannerOptionsModal for Maestro targeting
  • Extended e2e-balance-check workflow to also monitor OP token balance on Optimism
  • Changed RNWallet-Internal Xcode scheme to use Release build configuration

New GitHub Secrets Required

Secret Description
WPAY_CUSTOMER_KEY_MULTI_KYC WalletConnect Pay customer API key for the multi-option KYC merchant
WPAY_MERCHANT_ID_MULTI_KYC WalletConnect Pay merchant ID for the multi-option KYC merchant
WPAY_CUSTOMER_KEY_SINGLE_NOKYC WalletConnect Pay customer API key for the single-option no-KYC merchant
WPAY_MERCHANT_ID_SINGLE_NOKYC WalletConnect Pay merchant ID for the single-option no-KYC merchant

The old WPAY_CUSTOMER_KEY and WPAY_MERCHANT_ID secrets are no longer used and can be removed.

New GitHub Variables (optional)

Variable Description Default
OP_THRESHOLD_UNITS OP token balance alert threshold in wei 500000000000000000 (0.5 OP)

Test plan

  • Verify all four new Maestro Pay test flows pass on iOS simulator
  • Verify Android emulator E2E path still works
  • Confirm balance-check workflow alerts for both USDC and OP
  • Create the four new GitHub secrets before running CI

🤖 Generated with Claude Code

…nt creation

- Replace shell-based payment creation with JS scripts run inside Maestro flows
- Add separate test flows for single/multi option, KYC/no-KYC, and deeplink scenarios
- Pass WalletConnect Pay API keys as Maestro env vars instead of pre-creating payments
- Add testIDs to PaymentOptionsModal and Scanner components for E2E targeting
- Extend balance-check workflow to monitor OP token on Optimism
- Set Internal scheme to Release build configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 1, 2026 18:36
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pos-demo Ready Ready Preview, Comment Apr 1, 2026 7:43pm

Request Review

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

Claude finished @ignaciosantise's task in 43s —— View job


PR Review

  • Read CLAUDE.md for repo guidelines
  • Read changed files for context
  • Run breaking changes analysis
  • Run data classification analysis
  • Compile and post review

Found 4 issue(s)

Issue 1: pay_multiple_options_nokyc.yaml references undefined CI secrets

ID: pay-multi-nokyc-missing-secrets-b3f1
File: .maestro/pay_multiple_options_nokyc.yaml:10-11
Severity: HIGH
Category: breaking_change

Context:

  • Pattern: The flow passes WPAY_CUSTOMER_KEY_MULTI_NOKYC and WPAY_MERCHANT_ID_MULTI_NOKYC to create-payment.js, but neither the CI workflow nor the PR description's secrets table define these values. The workflow only passes WPAY_CUSTOMER_KEY_MULTI_KYC, WPAY_MERCHANT_ID_MULTI_KYC, WPAY_CUSTOMER_KEY_SINGLE_NOKYC, and WPAY_MERCHANT_ID_SINGLE_NOKYC.
  • Risk: The pay_multiple_options_nokyc.yaml test will always fail at runtime — WPAY_CUSTOMER_KEY and WPAY_MERCHANT_ID will be empty strings, the API call will return a 401, and the flow aborts with an uncaught error.
  • Impact: This test can never pass in CI as currently configured; the missing secrets/variables are also not mentioned in the PR description's setup checklist.
  • Trigger: Every CI run that includes the pay tag.

Recommendation: Either add the two missing secrets to CI (and the PR secrets table):

--env WPAY_CUSTOMER_KEY_MULTI_NOKYC="${{ secrets.WPAY_CUSTOMER_KEY_MULTI_NOKYC }}" \
--env WPAY_MERCHANT_ID_MULTI_NOKYC="${{ secrets.WPAY_MERCHANT_ID_MULTI_NOKYC }}" \

Or, if this merchant shares the KYC merchant credentials, rename the references in the flow to use WPAY_CUSTOMER_KEY_MULTI_KYC / WPAY_MERCHANT_ID_MULTI_KYC. Fix this →


Issue 2: app-id workflow_dispatch input removed — callers silently broken

ID: brk-ci_e2e_walletkit-remove-app-id-input-a3c1
File: .github/workflows/ci_e2e_walletkit.yaml:22-26
Severity: MEDIUM
Category: breaking_change

Context:

  • Pattern: The app-id input that allowed overriding the Maestro app bundle ID is removed and the value hardcoded. GitHub Actions silently ignores unknown inputs — callers passing app-id will have their override silently dropped.
  • Risk: Any workflow, script, or manual dispatch that passes inputs.app-id will no longer have any effect, causing Maestro tests to target the wrong app without any error.
  • Impact: External or cross-repo callers that customized the bundle ID.
  • Trigger: Any manual or programmatic dispatch with a custom app-id.

Recommendation: Verify no existing callers pass this input before merging. If flexibility may be needed, retain the input with the hardcoded value as default.


Issue 3: pay-info-required-badge testID rendered per option item, not once

ID: select-option-badge-testid-dup-c7a2
File: wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/SelectOptionView.tsx:138
Severity: MEDIUM
Category: code_quality

Context:

  • Pattern: testID="pay-info-required-badge" is placed on the Animated.View inside OptionItem, which renders once per payment option. On a merchant with N KYC options, N elements share the same testID.
  • Risk: assertVisible in pay_multiple_options_kyc.yaml will pass (any match), but assertNotVisible assertions on this ID could give false results if badge is hidden by animation while another instance is still mounted. Maestro may also warn on duplicate IDs.
  • Impact: Fragile test targeting on merchants with multiple KYC options.

Recommendation: Move the testID to a single container in SelectOptionView (outside the FlatList) or make it conditional on the aggregate hasCollectData state, so only one element ever carries this ID.


Issue 4: External public RPC URLs in balance-check workflow

ID: balance-check-external-rpc-urls-e91a
File: .github/workflows/e2e-balance-check.yml:14-15
Severity: LOW
Category: security

Context:

  • Pattern: https://mainnet.base.org and https://mainnet.optimism.io are third-party public RPC endpoints (not reown.com/walletconnect.com domains).
  • Risk: Rate-limited, unauthenticated public nodes. If they go down or rate-limit CI, the hourly balance check fails silently — no faucet alert sent.
  • Impact: Missed low-balance alerts during RPC unavailability.

Recommendation: Use authenticated RPC endpoints via secrets (BASE_RPC_URL, OP_RPC_URL) or accept the risk given this is only a monitoring workflow.

cast call returns hex-encoded values which bc cannot parse. Use
`cast to-dec` to convert to decimal before arithmetic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the rn_cli_wallet WalletConnect Pay Maestro E2E suite to create payments inline (via Maestro JS runScript) and adds more granular Pay flow coverage (single-option, multi-option, KYC, and deeplink), while updating app UI components with additional testID/accessibility hooks and adjusting CI workflows.

Changes:

  • Replaced the standalone scripts/create-payment.sh pre-step with .maestro/scripts/create-payment.js and reorganized Maestro Pay tests into reusable sub-flows.
  • Added/extended testID (and some accessibilityLabel) props across Pay UI components to improve Maestro targeting.
  • Updated CI workflows and balance monitoring (USDC on Base + OP on Optimism) and adjusted the iOS internal scheme launch configuration.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
wallets/rn_cli_wallet/src/modals/ScannerOptionsModal.tsx Shows the test URL input in test mode across platforms for Maestro automation.
wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/SelectOptionView.tsx Adds option indexing + testIDs and “info required” badge testID for Maestro.
wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/ReviewPaymentView.tsx Adds testIDs/accessibility labels to support verifying selection and pay CTA.
wallets/rn_cli_wallet/src/modals/PaymentOptionsModal/index.tsx Gates header info button and adds testID for Maestro selection.
wallets/rn_cli_wallet/src/components/Button.tsx Plumbs accessibilityLabel through the shared Button wrapper.
wallets/rn_cli_wallet/src/components/ActionButton.tsx Plumbs accessibilityLabel through ActionButton to underlying Button.
wallets/rn_cli_wallet/README.md Updates local Maestro invocation examples for new env vars + tags flag.
wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/xcshareddata/xcschemes/RNWallet-Internal.xcscheme Changes LaunchAction build configuration to Release.
wallets/rn_cli_wallet/AGENTS.md Updates Maestro Pay test file inventory and local run instructions.
scripts/create-payment.sh Removes obsolete shell-based payment creation helper.
.maestro/scripts/create-payment.js Adds Maestro JS script to create payments via WalletConnect Pay API.
.maestro/pay_single_option_nokyc.yaml New single-option no-KYC Pay flow.
.maestro/pay_single_option_nokyc_deeplink.yaml New deeplink variant of single-option no-KYC Pay flow.
.maestro/pay_multiple_options_nokyc.yaml New multi-option no-KYC Pay flow.
.maestro/pay_multiple_options_kyc.yaml New multi-option KYC Pay flow (includes webview steps).
.maestro/pay_confirm.yaml Removes old monolithic Pay confirm flow.
.maestro/flows/pay_open_via_deeplink.yaml Adds shared deeplink open + wait-for-merchant-info sub-flow.
.maestro/flows/pay_open_and_paste_url.yaml Adds shared scanner open + paste/type URL sub-flow.
.maestro/flows/pay_confirm_and_verify.yaml Adds shared confirm + success verification sub-flow.
.github/workflows/e2e-balance-check.yml Extends balance check workflow to include OP on Optimism.
.github/workflows/ci_e2e_walletkit.yaml Updates CI to run new Maestro flows and sets ENV_TEST_MODE=true for E2E.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cast call with a decoded return type already outputs decimal — the
extra `cast to-dec` was choking on the non-hex input. Just trim
whitespace instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Pay tests need USDC on both Base and Optimism, not OP token.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass WPAY_CUSTOMER_KEY_MULTI_NOKYC and WPAY_MERCHANT_ID_MULTI_NOKYC
to both iOS and Android Maestro invocations so
pay_multiple_options_nokyc.yaml can run in CI.

Also fix misleading comment in pay_open_via_deeplink sub-flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Android emulator needs 7.2 GB for userdata but only ~4 GB was left
after the APK build. Free unused SDK/toolchain dirs and set disk-size to
4096M.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
iOS: Enable Match development signing in build_for_simulator so
Associated Domains entitlement is embedded and universal links work.
Android: Add secrets.properties and internal keystore to E2E workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants