|
193 | 193 | <waitForPageLoad stepKey="waitForOrderSuccessPage2"/>
|
194 | 194 | <see stepKey="seeSuccessMessage2" selector="{{CheckoutSuccessMainSection.success}}" userInput="Your order number is:" />
|
195 | 195 | </test>
|
| 196 | + <test name="StorefrontCustomerCheckoutTestWithRestrictedCountriesForPayment"> |
| 197 | + <annotations> |
| 198 | + <features value="Checkout"/> |
| 199 | + <stories value="Checkout flow if payment solutions are not available"/> |
| 200 | + <title value="Checkout via Customer Checkout with restricted countries for payment"/> |
| 201 | + <description value="Should be able to place an order as a Customer with restricted countries for payment."/> |
| 202 | + <severity value="CRITICAL"/> |
| 203 | + <testCaseId value="MAGETWO-42653"/> |
| 204 | + <group value="checkout"/> |
| 205 | + </annotations> |
| 206 | + <before> |
| 207 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 208 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 209 | + <requiredEntity createDataKey="createCategory"/> |
| 210 | + </createData> |
| 211 | + <magentoCLI stepKey="allowSpecificValue" command="config:set payment/checkmo/allowspecific 1" /> |
| 212 | + <magentoCLI stepKey="specificCountryValue" command="config:set payment/checkmo/specificcountry GB" /> |
| 213 | + <createData entity="Simple_US_Customer" stepKey="simpleuscustomer"/> |
| 214 | + </before> |
| 215 | + <after> |
| 216 | + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> |
| 217 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 218 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 219 | + <magentoCLI stepKey="allowSpecificValue" command="config:set payment/checkmo/allowspecific 0" /> |
| 220 | + <magentoCLI stepKey="specificCountryValue" command="config:set payment/checkmo/specificcountry ''" /> |
| 221 | + </after> |
| 222 | + <!-- Login as Customer --> |
| 223 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 224 | + <argument name="Customer" value="$$simpleuscustomer$$" /> |
| 225 | + </actionGroup> |
| 226 | + |
| 227 | + <!-- Add product to cart --> |
| 228 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> |
| 229 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 230 | + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/> |
| 231 | + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/> |
| 232 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> |
| 233 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> |
| 234 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> |
| 235 | + |
| 236 | + <!-- Go to checkout page --> |
| 237 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="customerGoToCheckoutFromMinicart" /> |
| 238 | + |
| 239 | + <!-- Select address --> |
| 240 | + <click stepKey="selectAddress" selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}"/> |
| 241 | + <waitForElement stepKey="waitNextButton" selector="{{CheckoutShippingMethodsSection.next}}" time="30"/> |
| 242 | + <click stepKey="clickNextButton" selector="{{CheckoutShippingMethodsSection.next}}" /> |
| 243 | + <waitForPageLoad stepKey="waitBillingForm"/> |
| 244 | + <seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/> |
| 245 | + <waitForElementVisible selector="{{CheckoutPaymentSection.noQuotes}}" stepKey="waitMessage"/> |
| 246 | + <see userInput="No Payment method available." stepKey="checkMessage"/> |
| 247 | + |
| 248 | + <!-- Fill UK Address and verify that payment available and checkout successful --> |
| 249 | + <click selector="{{CheckoutHeaderSection.shippingMethodStep}}" stepKey="goToShipping" /> |
| 250 | + <click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="fillNewAddress" /> |
| 251 | + <actionGroup ref="LoggedInUserCheckoutAddNewShippingSectionWithoutRegionActionGroup" stepKey="customerCheckoutFillingShippingSectionUK"> |
| 252 | + <argument name="customerVar" value="CustomerEntityOne" /> |
| 253 | + <argument name="customerAddressVar" value="UK_Not_Default_Address" /> |
| 254 | + </actionGroup> |
| 255 | + <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="customerSelectCheckMoneyOrderPayment" /> |
| 256 | + <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="customerPlaceorder"> |
| 257 | + <argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage" /> |
| 258 | + <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" /> |
| 259 | + </actionGroup> |
| 260 | + </test> |
196 | 261 | </tests>
|
0 commit comments