|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontRefreshPageDuringGuestCheckoutTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Guest checkout"/> |
| 15 | + <title value="Storefront refresh page during guest checkout test"/> |
| 16 | + <description value="Address is not lost for guest checkout if guest refresh page during checkout"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-12084"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Login as admin --> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 24 | + |
| 25 | + <!-- Create simple product --> |
| 26 | + <createData entity="SimpleProduct2" stepKey="createProduct"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <!-- Delete simple product --> |
| 30 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 31 | + |
| 32 | + <!-- Logout admin --> |
| 33 | + <actionGroup ref="logout" stepKey="logoutAsAdmin"/> |
| 34 | + </after> |
| 35 | + <!-- Add simple product to cart as Guest --> |
| 36 | + <amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="goToProductPage"/> |
| 37 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 38 | + <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart"> |
| 39 | + <argument name="product" value="$$createProduct$$"/> |
| 40 | + <argument name="productCount" value="1"/> |
| 41 | + </actionGroup> |
| 42 | + |
| 43 | + <!-- Go to Checkout page --> |
| 44 | + <actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="goToShoppingCartFromMinicart"/> |
| 45 | + <click selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="clickProceedToCheckout"/> |
| 46 | + <waitForPageLoad stepKey="waitForProceedToCheckout"/> |
| 47 | + |
| 48 | + <!-- Fill email field and addresses form and go next --> |
| 49 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> |
| 50 | + <argument name="shippingMethod" value="Flat Rate"/> |
| 51 | + </actionGroup> |
| 52 | + |
| 53 | + <!-- Refresh page --> |
| 54 | + <reloadPage stepKey="refreshPage"/> |
| 55 | + |
| 56 | + <!-- Click Place Order and assert order is placed --> |
| 57 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 58 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 59 | + |
| 60 | + <!-- Order review page has address that was created during checkout --> |
| 61 | + <amOnPage url="{{AdminOrderPage.url({$grabOrderNumber})}}" stepKey="navigateToOrderPage"/> |
| 62 | + <waitForPageLoad stepKey="waitForCreatedOrderPage"/> |
| 63 | + <see selector="{{AdminShipmentAddressInformationSection.shippingAddress}}" userInput="{{CustomerAddressSimple.street[0]}} {{CustomerAddressSimple.city}}, {{CustomerAddressSimple.state}}, {{CustomerAddressSimple.postcode}}" stepKey="checkShippingAddress"/> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments