Skip to content
Draft
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
17 changes: 10 additions & 7 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ This directory contains Maestro end-to-end smoke flows for Checkout Kit sample
apps.

The current runnable suite starts with React Native. It verifies a full guest
checkout from a seeded cart in the sample app, through Shopify checkout, and
back to the app after completion.
checkout from a seeded cart and a hardcoded buyer identity checkout created
through the sample app, through Shopify checkout, and back to the app after
completion.

## Run locally

Expand All @@ -30,13 +31,15 @@ sample app, then run Maestro.

- `config.yaml` configures Maestro for shared platform behavior.
- `flows/` contains reusable Maestro subflows for app setup and checkout steps.
- `tests/react-native/full-guest-checkout.yaml` composes the React Native guest
- `tests/react-native/checkout-guest.yaml` composes the React Native guest
checkout smoke test from those subflows.
- `tests/react-native/checkout-hardcoded-buyer-identity.yaml` verifies the RN
sample can create a checkout from a cart with hardcoded buyer identity.

## Scope

This smoke flow is intended to catch regressions in the React Native sample app
integration surface: cart bootstrap, checkout presentation, checkout
completion, and return to the sample app. It is not a replacement for
checkout-web's browser-based coverage or for future native Swift and Android
sample-app E2E coverage.
integration surface: cart bootstrap, buyer identity configuration, checkout
presentation, checkout completion, and return to the sample app. It is not a
replacement for checkout-web's browser-based coverage or for future native
Swift and Android sample-app E2E coverage.
23 changes: 23 additions & 0 deletions e2e/flows/app/add-first-product-to-cart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
appId: ${APP_ID}
---
- tapOn:
id: catalog-tab
- extendedWaitUntil:
visible:
id: product-0-grid-item
timeout: 30000
- tapOn:
id: product-0-grid-item
- extendedWaitUntil:
visible:
id: add-to-cart-button
timeout: 30000
- tapOn:
id: add-to-cart-button
enabled: true
- tapOn:
id: cart-tab
- extendedWaitUntil:
visible:
id: checkout-button
timeout: 30000
9 changes: 9 additions & 0 deletions e2e/flows/app/dismiss-dev-warning.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: ${APP_ID}

@kyle-schellen kyle-schellen Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Required to dismiss optional React Native debug warning when it appears in dev builds.

---
- runFlow:
when:
visible: "Open debugger to view warnings."
commands:
- tapOn:
point: "92%,92%"
- waitForAnimationToEnd
1 change: 1 addition & 0 deletions e2e/flows/app/launch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ appId: ${APP_ID}
visible:
id: checkout-kit-sample-ready
timeout: 60000
- runFlow: dismiss-dev-warning.yaml
20 changes: 20 additions & 0 deletions e2e/flows/app/select-buyer-identity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: ${APP_ID}
---
- tapOn:
id: settings-tab
- waitForAnimationToEnd
- runFlow:
when:
notVisible:
id: settings-section-authentication
commands:
- tapOn:
id: settings-tab
- waitForAnimationToEnd
- extendedWaitUntil:
visible:
id: settings-section-authentication
timeout: 10000
- tapOn:
id: "settings-buyer-identity-option-${BUYER_IDENTITY_MODE}"
- waitForAnimationToEnd
2 changes: 1 addition & 1 deletion e2e/flows/checkout/present.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ appId: ${APP_ID}
enabled: true
- extendedWaitUntil:
visible:
text: "^Email( or mobile phone number)?$"
text: "^(Email( or mobile phone number)?|Delivery|Card number)$"
timeout: 60000
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
appId: ${APP_ID}
name: React Native full guest checkout
name: React Native checkout - guest

env:
# Checkout contact fixture
BUYER_IDENTITY_MODE: "guest"
EMAIL: "maestro.e2e@shopify.com"
FIRST_NAME: "Maestro"
LAST_NAME: "Shopify"
Expand All @@ -24,6 +25,7 @@ env:
POST_SUBMIT_RESULT_PATTERN: ".*(Thank you|Your order|Order confirmed|confirmation).*"
---
- runFlow: ../../flows/app/launch.yaml
- runFlow: ../../flows/app/select-buyer-identity.yaml
- runFlow: ../../flows/app/bootstrap-cart-from-link.yaml
- runFlow: ../../flows/checkout/present.yaml
- runFlow: ../../flows/checkout/fill-contact.yaml
Expand Down
26 changes: 26 additions & 0 deletions e2e/tests/react-native/checkout-hardcoded-buyer-identity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
appId: ${APP_ID}
name: React Native checkout - hardcoded buyer identity

env:
# Sample app buyer identity configuration
BUYER_IDENTITY_MODE: "hardcoded"

# Checkout payment fixture
CARD_NUMBER: "1"
CARD_SECURITY_CODE: "123"

# Accepted successful checkout states for this smoke test.
POST_SUBMIT_RESULT_PATTERN: ".*(Thank you|Your order|Order confirmed|confirmation).*"
---
- runFlow: ../../flows/app/launch.yaml
- runFlow: ../../flows/app/select-buyer-identity.yaml
- extendedWaitUntil:
visible:
id: settings-buyer-identity-details
timeout: 5000
- runFlow: ../../flows/app/add-first-product-to-cart.yaml
- runFlow: ../../flows/checkout/present.yaml
- runFlow: ../../flows/checkout/fill-payment-card.yaml
- runFlow: ../../flows/checkout/submit.yaml
- runFlow: ../../flows/checkout/assert-complete.yaml
- runFlow: ../../flows/checkout/assert-returned-to-empty-cart.yaml
4 changes: 2 additions & 2 deletions platforms/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"snapshot": "./scripts/create_snapshot",
"compare-snapshot": "./scripts/compare_snapshot",
"test": "jest",
"e2e:ios": "maestro --platform ios test --config ../../e2e/config.yaml -e APP_ID=com.shopify.checkoutkit.reactnativedemo -e 'CART_BOOTSTRAP_LINK=com.shopify.checkoutkit.reactnativedemo://cart?productIndex=0&quantity=1' ../../e2e/tests/react-native/full-guest-checkout.yaml",
"e2e:android": "maestro --platform android test --config ../../e2e/config.yaml -e APP_ID=com.shopify.checkoutkit.reactnativedemo -e 'CART_BOOTSTRAP_LINK=com.shopify.checkoutkit.reactnativedemo://cart?productIndex=0&quantity=1' ../../e2e/tests/react-native/full-guest-checkout.yaml"
"e2e:ios": "maestro --platform ios test --config ../../e2e/config.yaml -e APP_ID=com.shopify.checkoutkit.reactnativedemo -e 'CART_BOOTSTRAP_LINK=com.shopify.checkoutkit.reactnativedemo://cart?productIndex=0&quantity=1' ../../e2e/tests/react-native",
"e2e:android": "maestro --platform android test --config ../../e2e/config.yaml -e APP_ID=com.shopify.checkoutkit.reactnativedemo -e 'CART_BOOTSTRAP_LINK=com.shopify.checkoutkit.reactnativedemo://cart?productIndex=0&quantity=1' ../../e2e/tests/react-native"
},
"devDependencies": {
"@babel/core": "^7.29.7",
Expand Down
Loading