Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions maestro/pay-tests/.maestro/flows/pay_confirm_and_verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
appId: ${APP_ID}
---
# Shared flow: Tap Pay, verify loading, wait for success, tap "Got it!"

# On review screen, tap Pay button
- extendedWaitUntil:
visible:
id: "pay-button-pay"
timeout: 10000
- tapOn:
id: "pay-button-pay"

# Wait for success screen (generous timeout for on-chain confirmation)
- extendedWaitUntil:
visible:
id: "pay-result-success-icon"
timeout: 30000

# Tap "Got it!" button
- tapOn:
id: "pay-button-result-action-success"
30 changes: 30 additions & 0 deletions maestro/pay-tests/.maestro/flows/pay_open_and_paste_url.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
appId: ${APP_ID}
---
# Shared flow: Launch wallet, open scanner, paste payment URL, wait for merchant info
# Requires: ${output.gateway_url} to be set by a prior runScript step

# Launch wallet app
- launchApp:
appId: ${APP_ID}
permissions:
all: allow

# Tap scan button to open scanner options modal
- tapOn:
id: "button-scan"

# Type the payment URL into the test input field
- tapOn:
id: "input-paste-url"

# Dismiss iOS keyboard language prompt if it appears
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"

- inputText: ${output.gateway_url}
- pressKey: Enter
- tapOn:
id: "button-submit-url"
7 changes: 7 additions & 0 deletions maestro/pay-tests/.maestro/flows/pay_open_via_deeplink.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
appId: ${APP_ID}
---
# Shared flow: Open payment URL via deep link
# Requires: ${output.gateway_url} to be set by a prior runScript step

# Open the payment URL as a deep link
- openLink: ${output.gateway_url}
85 changes: 85 additions & 0 deletions maestro/pay-tests/.maestro/pay_cancel_from_kyc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
appId: ${APP_ID}
name: WalletConnect Pay - Cancel from KYC Webview
tags:
- pay
---
# Create payment via API (multi-option, KYC merchant)
- runScript:
file: scripts/create-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_MULTI_KYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_MULTI_KYC}

- startRecording: "WalletConnect Pay Cancel from KYC"

# Open wallet, paste payment URL
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# Wait for payment options to load
- extendedWaitUntil:
visible:
id: "pay-merchant-info"
timeout: 15000

# Verify first option is pre-selected
- assertVisible:
id: "pay-option-0-selected"

# Tap Continue to go to collectData webview
- tapOn:
id: "pay-button-continue"

# Wait for KYC webview to load
- extendedWaitUntil:
visible: "Add your personal details"
timeout: 10000

# Cancel the payment server-side while in KYC webview
- runScript:
file: scripts/cancel-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_MULTI_KYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_MULTI_KYC}
PAYMENT_ID: ${output.payment_id}

# Complete KYC form (data is autocompleted, just tap Add)
- tapOn: "Add"

# Retry tap on "Add" if "Confirm your details" doesn't appear (webview can be slow)
- runFlow:
when:
notVisible: "Confirm your details"
commands:
- tapOn: "Add"

# Confirm your details popup
- extendedWaitUntil:
visible: "Confirm your details"
timeout: 10000

# Tap the checkbox / label for terms agreement
- tapOn:
text: "I agree to the <termsLink>Terms and Conditions</termsLink> and <privacyLink>Privacy Policy</privacyLink>"
retryTapIfNoChange: true
- tapOn: "Confirm"

# Wait for result screen
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 30000

# Verify cancelled icon
- assertVisible:
id: "pay-result-cancelled-icon"

# Verify action button
- assertVisible:
id: "pay-button-result-action-cancelled"

# Dismiss
- tapOn:
id: "pay-button-result-action-cancelled"

- stopRecording
61 changes: 61 additions & 0 deletions maestro/pay-tests/.maestro/pay_cancel_from_review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
appId: ${APP_ID}
name: WalletConnect Pay - Cancel from Review Screen
tags:
- pay
---
# Create payment via API (single-option, no-KYC merchant)
- runScript:
file: scripts/create-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_SINGLE_NOKYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_SINGLE_NOKYC}

- startRecording: "WalletConnect Pay Cancel from Review"

# Open wallet, paste payment URL
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# Wait for payment options to load
- extendedWaitUntil:
visible:
id: "pay-merchant-info"
timeout: 15000

# Single option auto-selects — verify review screen
- extendedWaitUntil:
visible:
id: "pay-button-pay"
timeout: 10000

# Cancel the payment server-side while on review screen
- runScript:
file: scripts/cancel-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_SINGLE_NOKYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_SINGLE_NOKYC}
PAYMENT_ID: ${output.payment_id}

# Tap Pay — payment was cancelled, should show cancelled result
- tapOn:
id: "pay-button-pay"

# Wait for result screen
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 30000

# Verify cancelled icon
- assertVisible:
id: "pay-result-cancelled-icon"

# Verify action button
- assertVisible:
id: "pay-button-result-action-cancelled"

# Dismiss
- tapOn:
id: "pay-button-result-action-cancelled"

- stopRecording
33 changes: 33 additions & 0 deletions maestro/pay-tests/.maestro/pay_cancelled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
appId: ${APP_ID}
name: WalletConnect Pay - Cancelled Payment
tags:
- pay
---
# Use a hardcoded cancelled payment URL (no API call needed)
- evalScript: ${output.gateway_url = 'https://pay.walletconnect.com/?pid=pay_24a2ecc101KNHMZ1B8GJMR16VXAZ2EXXMN'}

- startRecording: "WalletConnect Pay Cancelled Payment"

# Open wallet, paste payment URL
Comment thread
ignaciosantise marked this conversation as resolved.
Outdated
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# Payment is cancelled — app shows error result screen directly
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 15000

# Verify cancelled icon is shown
- assertVisible:
id: "pay-result-cancelled-icon"

# Verify result action button is visible
- assertVisible:
id: "pay-button-result-action-cancelled"

# Dismiss the error dialog
- tapOn:
id: "pay-button-result-action-cancelled"

- stopRecording
81 changes: 81 additions & 0 deletions maestro/pay-tests/.maestro/pay_double_scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
appId: ${APP_ID}
name: WalletConnect Pay - Double Scan Same Payment
tags:
- pay
---
# Create payment via API (single-option, no-KYC merchant)
- runScript:
file: scripts/create-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_SINGLE_NOKYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_SINGLE_NOKYC}

- startRecording: "WalletConnect Pay Double Scan"

# === First scan: complete the payment normally ===

# Open wallet, paste payment URL
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# Wait for payment options to load
- extendedWaitUntil:
visible:
id: "pay-merchant-info"
timeout: 15000

# Single option auto-selects — verify pay button
- extendedWaitUntil:
visible:
id: "pay-button-pay"
timeout: 10000
- copyTextFrom:
id: "pay-button-pay"
- assertTrue:
condition: "${maestro.copiedText == 'Pay $0.01'}"

# Tap Pay, verify success, tap "Got it!"
- runFlow:
file: flows/pay_confirm_and_verify.yaml

# === Second scan: re-open the same gateway URL ===

# Tap scan button to open scanner
- tapOn:
id: "button-scan"

# Type the same payment URL
- tapOn:
id: "input-paste-url"

# Dismiss iOS keyboard language prompt if it appears
- runFlow:
when:
visible: "Continue"
commands:
- tapOn: "Continue"

- inputText: ${output.gateway_url}
- pressKey: Enter
- tapOn:
id: "button-submit-url"

# Wait for error result screen (payment already completed)
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 20000

# Verify generic error icon is shown (not success)
- assertVisible:
id: "pay-result-error-icon"

# Verify result action button is visible
- assertVisible:
id: "pay-button-result-action-generic"

# Dismiss the error dialog
- tapOn:
id: "pay-button-result-action-generic"

- stopRecording
33 changes: 33 additions & 0 deletions maestro/pay-tests/.maestro/pay_expired_link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
appId: ${APP_ID}
name: WalletConnect Pay - Expired Link
tags:
- pay
---
# Use a hardcoded expired payment URL (no API call needed)
- evalScript: ${output.gateway_url = 'https://pay.walletconnect.com/?pid=pay_b8a2ecc101KNHRNWXD2VF8SGZDS7WK19ZA'}

- startRecording: "WalletConnect Pay Expired Link"

# Open wallet, paste payment URL
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# Payment is expired — app shows error result screen directly
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 15000

# Verify expired icon is shown
- assertVisible:
id: "pay-result-expired-icon"

# Verify result action button is visible
- assertVisible:
id: "pay-button-result-action-expired"

# Dismiss the error dialog
- tapOn:
id: "pay-button-result-action-expired"

- stopRecording
38 changes: 38 additions & 0 deletions maestro/pay-tests/.maestro/pay_insufficient_funds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
appId: ${APP_ID}
name: WalletConnect Pay - Insufficient Funds
tags:
- pay
---
# Create payment with amount exceeding wallet balance ($9.99)
- runScript:
file: scripts/create-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_SINGLE_NOKYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_SINGLE_NOKYC}
WPAY_AMOUNT: "999"

- startRecording: "WalletConnect Pay Insufficient Funds"

# Open wallet, paste payment URL
- runFlow:
file: flows/pay_open_and_paste_url.yaml

# No options available — app jumps directly to error result screen
- extendedWaitUntil:
visible:
id: "pay-result-container"
timeout: 15000

# Verify insufficient funds icon is shown
- assertVisible:
id: "pay-result-insufficient-funds-icon"

# Verify result action button is visible
- assertVisible:
id: "pay-button-result-action-insufficient_funds"

# Dismiss the error dialog
- tapOn:
id: "pay-button-result-action-insufficient_funds"

- stopRecording
Loading
Loading