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
4 changes: 4 additions & 0 deletions e2e/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
platform:
ios:
# Lets Maestro inspect elements presented inside iOS checkout modal views.
snapshotKeyHonorModalViews: true
13 changes: 13 additions & 0 deletions e2e/flows/app/bootstrap-cart-from-link.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
appId: ${APP_ID}
---
- stopApp
- openLink: "${CART_BOOTSTRAP_LINK}"
- runFlow:
when:
visible: "Open"
commands:
- tapOn: "Open"
- extendedWaitUntil:
visible:
id: checkout-button
timeout: 30000
12 changes: 12 additions & 0 deletions e2e/flows/app/launch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
appId: ${APP_ID}
---
- launchApp:
clearState: true
arguments:
# iOS-only launch arguments; Android ignores them.
AppleLocale: en_US
AppleLanguages: "(en)"
- extendedWaitUntil:
visible:
id: checkout-kit-sample-ready
timeout: 60000
5 changes: 5 additions & 0 deletions e2e/flows/checkout/assert-complete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
appId: ${APP_ID}
---
- extendedWaitUntil:
visible: "${POST_SUBMIT_RESULT_PATTERN}"
timeout: 60000
14 changes: 14 additions & 0 deletions e2e/flows/checkout/assert-returned-to-empty-cart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
appId: ${APP_ID}
---
- tapOn: "Close Checkout"
- runFlow:
when:
visible:
id: catalog-tab
commands:
- tapOn:
id: cart-tab
- extendedWaitUntil:
visible:
id: cart-empty-message
timeout: 15000
40 changes: 40 additions & 0 deletions e2e/flows/checkout/fill-contact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
appId: ${APP_ID}
---
- tapOn:
text: "^Email( or mobile phone number)?$"
- inputText: "${EMAIL}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- extendedWaitUntil:
visible: "^${EMAIL}$"
- scrollUntilVisible:
element:
text: "^First name( \\(optional\\))?$"
direction: DOWN
visibilityPercentage: 100
centerElement: true
- tapOn:
text: "^First name( \\(optional\\))?$"
- inputText: "${FIRST_NAME}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- scrollUntilVisible:
element:
text: "^Last name$"
direction: DOWN
visibilityPercentage: 100
centerElement: true
- tapOn:
text: "^Last name$"
- inputText: "${LAST_NAME}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
51 changes: 51 additions & 0 deletions e2e/flows/checkout/fill-payment-card.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
appId: ${APP_ID}
---
- scrollUntilVisible:
element:
text: "^Card number$"
direction: DOWN
centerElement: true
- tapOn:
text: "^Card number$"
index: -1
- inputText: "${CARD_NUMBER}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- scrollUntilVisible:
element:
text: "^Expiration date \\(MM / YY\\)$"
direction: DOWN
centerElement: true
- tapOn:
text: "^Expiration date \\(MM / YY\\)$"
index: -1
- inputText: "1"
- waitForAnimationToEnd
- inputText: "2"
- waitForAnimationToEnd
- inputText: "3"
- waitForAnimationToEnd
- inputText: "0"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- scrollUntilVisible:
element:
text: "^Security code$"
direction: DOWN
centerElement: true
- tapOn:
text: "^Security code$"
index: -1
- inputText: "${CARD_SECURITY_CODE}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- waitForAnimationToEnd
112 changes: 112 additions & 0 deletions e2e/flows/checkout/fill-shipping-address.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
appId: ${APP_ID}
---
- scrollUntilVisible:
element:
text: "Country/Region"
direction: DOWN
- tapOn:
text: "Country/Region"
index: 1
- waitForAnimationToEnd
- scrollUntilVisible:
element:
text: "^${COUNTRY_LABEL}$"
direction: UP
visibilityPercentage: 10
optional: true
- scrollUntilVisible:
element:
text: "^${COUNTRY_LABEL}$"
direction: DOWN
visibilityPercentage: 10
optional: true
- tapOn:
text: "^${COUNTRY_LABEL}$"
- waitForAnimationToEnd
- scrollUntilVisible:
element:
text: "Address"
direction: DOWN
- tapOn:
text: "Address"
index: -1
- eraseText: 80
- inputText: "${ADDRESS_LINE1}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- runFlow:
when:
visible: "Close suggestions"
commands:
- tapOn: "Close suggestions"
- waitForAnimationToEnd
- scrollUntilVisible:
element:
text: "^City$"
direction: DOWN
centerElement: true
- tapOn:
text: "^City$"
index: -1
- eraseText: 80
- inputText: "${CITY}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- tapOn: "^Delivery$"
- waitForAnimationToEnd
- scrollUntilVisible:
element:
text: "^${STATE_FIELD_LABEL}$"
direction: DOWN
centerElement: true
- runFlow:
when:
notVisible: "^${STATE_LABEL}$"
commands:
- tapOn:
containsChild:
text: "^${STATE_FIELD_LABEL}$"
- waitForAnimationToEnd
- scrollUntilVisible:
element:
text: "^${STATE_LABEL}$"
direction: UP
visibilityPercentage: 100
optional: true
- scrollUntilVisible:
element:
text: "^${STATE_LABEL}$"
direction: DOWN
visibilityPercentage: 100
optional: true
- tapOn:
text: "^${STATE_LABEL}$"
- waitForAnimationToEnd
- extendedWaitUntil:
notVisible: "Select a state"
- extendedWaitUntil:
visible: "^${STATE_LABEL}$"
- scrollUntilVisible:
element:
text: "^${POSTAL_FIELD_LABEL}$"
direction: DOWN
centerElement: true
- tapOn:
text: "^${POSTAL_FIELD_LABEL}$"
index: -1
- eraseText: 80
- inputText: "${POSTAL_CODE}"
- runFlow:
when:
visible: "selected"
commands:
- tapOn: "selected"
- extendedWaitUntil:
visible: "^${POSTAL_CODE}$"
- waitForAnimationToEnd
9 changes: 9 additions & 0 deletions e2e/flows/checkout/present.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: ${APP_ID}
---
- tapOn:
id: checkout-button
enabled: true
- extendedWaitUntil:
visible:
text: "^Email( or mobile phone number)?$"
timeout: 60000
10 changes: 10 additions & 0 deletions e2e/flows/checkout/submit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
appId: ${APP_ID}
---
- scrollUntilVisible:
element:
text: "^(Pay now|Complete order)$"
direction: DOWN
visibilityPercentage: 90
- tapOn:
text: "^(Pay now|Complete order)$"
enabled: true
34 changes: 34 additions & 0 deletions e2e/tests/react-native/full-guest-checkout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
appId: ${APP_ID}
name: React Native full guest checkout

env:
# Checkout contact fixture
EMAIL: "maestro.e2e@shopify.com"
FIRST_NAME: "Maestro"
LAST_NAME: "Shopify"

# Checkout shipping fixture
COUNTRY_LABEL: "United States"
ADDRESS_LINE1: "700 S Flower St"
CITY: "Los Angeles"
STATE_FIELD_LABEL: "State"
STATE_LABEL: "California"
POSTAL_CODE: "90017"
POSTAL_FIELD_LABEL: "ZIP code"

# 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/bootstrap-cart-from-link.yaml
- runFlow: ../../flows/checkout/present.yaml
- runFlow: ../../flows/checkout/fill-contact.yaml
- runFlow: ../../flows/checkout/fill-shipping-address.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
Loading