|
| 1 | +appId: com.shopify.checkoutkitreactnative |
| 2 | +name: Checkout submits and shows result |
| 3 | +tags: |
| 4 | + - android |
| 5 | + - checkout |
| 6 | + |
| 7 | +env: |
| 8 | + # CI shipping fixture |
| 9 | + COUNTRY_LABEL: "United States" |
| 10 | + ADDRESS_LINE1: "123 E2E Test St" |
| 11 | + CITY: "Los Angeles" |
| 12 | + STATE_FIELD_LABEL: "State" |
| 13 | + STATE_LABEL: "California" |
| 14 | + POSTAL_CODE: "90017" |
| 15 | + POSTAL_FIELD_LABEL: "ZIP code" |
| 16 | + |
| 17 | + # CI payment fixture |
| 18 | + CARD_NUMBER: "1" |
| 19 | + CARD_EXPIRY_DISPLAY: "12 / 30" |
| 20 | + CARD_SECURITY_CODE: "123" |
| 21 | + CARDHOLDER_NAME: "Maestro Shopify" |
| 22 | + |
| 23 | + # Accepted terminal checkout states for this smoke test. |
| 24 | + POST_SUBMIT_RESULT_PATTERN: ".*(Thank you|Your order|Order confirmed|confirmation|Shipping not available|There was a problem|declined|couldn.t process).*" |
| 25 | +--- |
| 26 | +# Timeout tiers: |
| 27 | +# 10000 - in-app interactions (taps, animations) |
| 28 | +# 30000 - checkout step transitions (network) |
| 29 | +# 60000 - cold starts, first checkout paint, final submit |
| 30 | + |
| 31 | +# Product and cart |
| 32 | +- launchApp: |
| 33 | + clearState: true |
| 34 | +- extendedWaitUntil: |
| 35 | + visible: |
| 36 | + id: product-0-add-to-cart-button |
| 37 | + timeout: 60000 |
| 38 | +- scrollUntilVisible: |
| 39 | + element: |
| 40 | + id: product-0-add-to-cart-button |
| 41 | + direction: DOWN |
| 42 | + timeout: 10000 |
| 43 | + centerElement: true |
| 44 | +- tapOn: |
| 45 | + id: product-0-add-to-cart-button |
| 46 | + enabled: true |
| 47 | +- waitForAnimationToEnd: |
| 48 | + timeout: 10000 |
| 49 | +- runFlow: |
| 50 | + when: |
| 51 | + visible: |
| 52 | + id: header-cart-icon |
| 53 | + commands: |
| 54 | + - tapOn: |
| 55 | + id: header-cart-icon |
| 56 | +- runFlow: |
| 57 | + when: |
| 58 | + notVisible: |
| 59 | + id: checkout-button |
| 60 | + commands: |
| 61 | + - tapOn: |
| 62 | + id: cart-tab |
| 63 | +- extendedWaitUntil: |
| 64 | + visible: |
| 65 | + id: checkout-button |
| 66 | + timeout: 30000 |
| 67 | +- tapOn: |
| 68 | + id: checkout-button |
| 69 | + enabled: true |
| 70 | + |
| 71 | +# Contact |
| 72 | +- extendedWaitUntil: |
| 73 | + visible: |
| 74 | + text: "^Email( or mobile phone number)?$" |
| 75 | + timeout: 60000 |
| 76 | +- tapOn: |
| 77 | + id: email |
| 78 | +- inputText: "maestro.e2e@shopify.com" |
| 79 | +- extendedWaitUntil: |
| 80 | + visible: "^maestro.e2e@shopify.com$" |
| 81 | + timeout: 10000 |
| 82 | +- scrollUntilVisible: |
| 83 | + element: |
| 84 | + id: TextField0 |
| 85 | + direction: DOWN |
| 86 | + timeout: 10000 |
| 87 | + centerElement: true |
| 88 | +- tapOn: |
| 89 | + id: TextField0 |
| 90 | +- inputText: "Maestro" |
| 91 | +- extendedWaitUntil: |
| 92 | + visible: "^Maestro$" |
| 93 | + timeout: 10000 |
| 94 | +- scrollUntilVisible: |
| 95 | + element: |
| 96 | + id: TextField1 |
| 97 | + direction: DOWN |
| 98 | + timeout: 10000 |
| 99 | + centerElement: true |
| 100 | +- tapOn: |
| 101 | + id: TextField1 |
| 102 | +- inputText: "Shopify" |
| 103 | +- extendedWaitUntil: |
| 104 | + visible: "^Shopify$" |
| 105 | + timeout: 10000 |
| 106 | + |
| 107 | +# Shipping address |
| 108 | +- scrollUntilVisible: |
| 109 | + element: |
| 110 | + id: Select0 |
| 111 | + direction: DOWN |
| 112 | + timeout: 10000 |
| 113 | +- tapOn: |
| 114 | + id: Select0 |
| 115 | +- waitForAnimationToEnd: |
| 116 | + timeout: 10000 |
| 117 | +- scrollUntilVisible: |
| 118 | + element: |
| 119 | + text: "^${COUNTRY_LABEL}$" |
| 120 | + direction: UP |
| 121 | + timeout: 10000 |
| 122 | + visibilityPercentage: 10 |
| 123 | + optional: true |
| 124 | +- scrollUntilVisible: |
| 125 | + element: |
| 126 | + text: "^${COUNTRY_LABEL}$" |
| 127 | + direction: DOWN |
| 128 | + timeout: 10000 |
| 129 | + visibilityPercentage: 10 |
| 130 | + optional: true |
| 131 | +- tapOn: |
| 132 | + text: "^${COUNTRY_LABEL}$" |
| 133 | +- waitForAnimationToEnd: |
| 134 | + timeout: 10000 |
| 135 | + |
| 136 | +- scrollUntilVisible: |
| 137 | + element: |
| 138 | + id: shipping-address1 |
| 139 | + direction: DOWN |
| 140 | + timeout: 10000 |
| 141 | +- tapOn: |
| 142 | + id: shipping-address1 |
| 143 | +- eraseText: 80 |
| 144 | +- inputText: "${ADDRESS_LINE1}" |
| 145 | +- waitForAnimationToEnd: |
| 146 | + timeout: 10000 |
| 147 | +- extendedWaitUntil: |
| 148 | + visible: "^${ADDRESS_LINE1}$" |
| 149 | + timeout: 10000 |
| 150 | +- extendedWaitUntil: |
| 151 | + notVisible: |
| 152 | + id: shipping-address1-autocomplete-title |
| 153 | + timeout: 10000 |
| 154 | +- extendedWaitUntil: |
| 155 | + notVisible: |
| 156 | + id: shipping-address1-options |
| 157 | + timeout: 10000 |
| 158 | +- scrollUntilVisible: |
| 159 | + element: |
| 160 | + id: TextField3 |
| 161 | + direction: DOWN |
| 162 | + timeout: 10000 |
| 163 | + centerElement: true |
| 164 | +- tapOn: |
| 165 | + id: TextField3 |
| 166 | +- eraseText: 80 |
| 167 | +- inputText: "${CITY}" |
| 168 | +- extendedWaitUntil: |
| 169 | + visible: "^${CITY}$" |
| 170 | + timeout: 10000 |
| 171 | +- scrollUntilVisible: |
| 172 | + element: |
| 173 | + id: Select1 |
| 174 | + direction: DOWN |
| 175 | + timeout: 10000 |
| 176 | + centerElement: true |
| 177 | +- runFlow: |
| 178 | + when: |
| 179 | + notVisible: "^${STATE_LABEL}$" |
| 180 | + commands: |
| 181 | + - tapOn: |
| 182 | + id: Select1 |
| 183 | + - waitForAnimationToEnd: |
| 184 | + timeout: 10000 |
| 185 | + - scrollUntilVisible: |
| 186 | + element: |
| 187 | + text: "^${STATE_LABEL}$" |
| 188 | + direction: UP |
| 189 | + timeout: 10000 |
| 190 | + visibilityPercentage: 100 |
| 191 | + optional: true |
| 192 | + - scrollUntilVisible: |
| 193 | + element: |
| 194 | + text: "^${STATE_LABEL}$" |
| 195 | + direction: DOWN |
| 196 | + timeout: 10000 |
| 197 | + visibilityPercentage: 100 |
| 198 | + optional: true |
| 199 | + - tapOn: |
| 200 | + text: "^${STATE_LABEL}$" |
| 201 | + - waitForAnimationToEnd: |
| 202 | + timeout: 10000 |
| 203 | +- extendedWaitUntil: |
| 204 | + notVisible: "Select a state" |
| 205 | + timeout: 10000 |
| 206 | +- extendedWaitUntil: |
| 207 | + visible: "^${STATE_LABEL}$" |
| 208 | + timeout: 10000 |
| 209 | +- scrollUntilVisible: |
| 210 | + element: |
| 211 | + id: TextField4 |
| 212 | + direction: DOWN |
| 213 | + timeout: 10000 |
| 214 | + centerElement: true |
| 215 | +- tapOn: |
| 216 | + id: TextField4 |
| 217 | +- eraseText: 80 |
| 218 | +- inputText: "${POSTAL_CODE}" |
| 219 | +- extendedWaitUntil: |
| 220 | + visible: "^${POSTAL_CODE}$" |
| 221 | + timeout: 10000 |
| 222 | +- waitForAnimationToEnd: |
| 223 | + timeout: 10000 |
| 224 | + |
| 225 | +# Payment |
| 226 | +- scrollUntilVisible: |
| 227 | + element: |
| 228 | + id: number |
| 229 | + direction: DOWN |
| 230 | + timeout: 10000 |
| 231 | + centerElement: true |
| 232 | +- tapOn: |
| 233 | + id: number |
| 234 | +- inputText: "${CARD_NUMBER}" |
| 235 | +- tapOn: |
| 236 | + id: expiry |
| 237 | +- inputText: "1" |
| 238 | +- waitForAnimationToEnd: |
| 239 | + timeout: 10000 |
| 240 | +- inputText: "2" |
| 241 | +- waitForAnimationToEnd: |
| 242 | + timeout: 10000 |
| 243 | +- inputText: "3" |
| 244 | +- waitForAnimationToEnd: |
| 245 | + timeout: 10000 |
| 246 | +- inputText: "0" |
| 247 | +- extendedWaitUntil: |
| 248 | + visible: "^${CARD_EXPIRY_DISPLAY}$" |
| 249 | + timeout: 10000 |
| 250 | +- tapOn: |
| 251 | + id: verification_value |
| 252 | +- inputText: "${CARD_SECURITY_CODE}" |
| 253 | +- extendedWaitUntil: |
| 254 | + visible: "^${CARD_SECURITY_CODE}$" |
| 255 | + timeout: 10000 |
| 256 | +- scrollUntilVisible: |
| 257 | + element: |
| 258 | + id: name |
| 259 | + direction: DOWN |
| 260 | + timeout: 30000 |
| 261 | + centerElement: true |
| 262 | +- extendedWaitUntil: |
| 263 | + visible: "^${CARDHOLDER_NAME}$" |
| 264 | + timeout: 10000 |
| 265 | +- scrollUntilVisible: |
| 266 | + element: |
| 267 | + text: "^(Pay now|Complete order)$" |
| 268 | + direction: DOWN |
| 269 | + timeout: 30000 |
| 270 | +- tapOn: |
| 271 | + text: "^(Pay now|Complete order)$" |
| 272 | + enabled: true |
| 273 | +- extendedWaitUntil: |
| 274 | + visible: "${POST_SUBMIT_RESULT_PATTERN}" |
| 275 | + timeout: 60000 |
0 commit comments