Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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"
43 changes: 43 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,43 @@
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

# Wait for the app to fully load before interacting
- extendedWaitUntil:
visible:
id: "button-scan"
timeout: 15000

# 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

- extendedWaitUntil:
visible:
id: "button-submit-url"
timeout: 10000

- tapOn:
id: "button-submit-url"
9 changes: 9 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,9 @@
appId: ${APP_ID}
---
# Shared flow: Open payment URL via deep link
# Requires: ${output.gateway_url} to be set by a prior runScript step

# Stop app then open via deeplink so openLink is the launch intent.
- stopApp:
appId: ${APP_ID}
- 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: 30000

# 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
44 changes: 44 additions & 0 deletions maestro/pay-tests/.maestro/pay_cancelled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
appId: ${APP_ID}
name: WalletConnect Pay - Cancelled Payment
tags:
- pay
---
# Create a fresh payment, then cancel it immediately via API
- runScript:
file: scripts/create-payment.js
env:
WPAY_CUSTOMER_KEY: ${WPAY_CUSTOMER_KEY_SINGLE_NOKYC}
WPAY_MERCHANT_ID: ${WPAY_MERCHANT_ID_SINGLE_NOKYC}

- 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}

- startRecording: "WalletConnect Pay Cancelled Payment"

# Open wallet, paste payment URL
- 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
Loading
Loading