|
| 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="StorefrontVerifyShipToShipMethodContainsSameDataTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Guest checkout"/> |
| 15 | + <title value="Ship To and Shipping Method blocks on Checkout contain actual information according to input data"/> |
| 16 | + <description value="Ship To and Shipping Method blocks on Checkout contain actual information according to input data"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-4628"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Enable free shipping --> |
| 22 | + <createData entity="FreeShippingMethodsSettingConfig" stepKey="enableFreeShippingConfig"/> |
| 23 | + <!-- create category --> |
| 24 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 25 | + <!-- create simple product --> |
| 26 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/> |
| 32 | + <!-- delete category --> |
| 33 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 34 | + <!-- delete simple product --> |
| 35 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 36 | + </after> |
| 37 | + <!-- Go to Storefront as Guest and add product to cart --> |
| 38 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="guestOpenProductPage"> |
| 39 | + <argument name="product" value="$$createProduct$$"/> |
| 40 | + </actionGroup> |
| 41 | + <waitForPageLoad stepKey="waitForPageLoadToGetTheStorePageOpen"/> |
| 42 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addSimpleProductToCartFromStorefront"> |
| 43 | + <argument name="productName" value="$createProduct.name$"/> |
| 44 | + </actionGroup> |
| 45 | + <!-- Proceed to Checkout --> |
| 46 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="guestProceedsToCheckout"/> |
| 47 | + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearPostClickingOnCheckout"/> |
| 48 | + <!-- verify shipping screen is opened --> |
| 49 | + <waitForElement selector="{{CheckoutShippingSection.isShippingStep}}" stepKey="shippingStepIsOpened"/> |
| 50 | + <!--Filling shipping information and click next--> |
| 51 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShipping"> |
| 52 | + <argument name="shippingMethod" value="Flat Rate"/> |
| 53 | + </actionGroup> |
| 54 | + <!--Review & Payments step of checkout is opened where Correct Billing address is verified--> |
| 55 | + <actionGroup ref="CheckShipToInformationInCheckoutActionGroup" stepKey="verifyShipToInformation"> |
| 56 | + <argument name="customerVar" value="CustomerEntityOne" /> |
| 57 | + <argument name="customerAddressVar" value="CustomerAddressSimple" /> |
| 58 | + </actionGroup> |
| 59 | + <!-- Assert Shipping Method = "Flat Rate" --> |
| 60 | + <waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethod"/> |
| 61 | + <!-- Reload Page and wait for page to get reload --> |
| 62 | + <reloadPage stepKey="refreshPageToVerifyAllInformationIsPresent"/> |
| 63 | + <waitForPageLoad stepKey="waitForPageToLoadProperlyToAssertShipToInformationDetails"/> |
| 64 | + <!-- Check that "Ship To" block contains correct information --> |
| 65 | + <actionGroup ref="GuestVerifiesTheShipToDetailsOnStorefrontCheckoutPaymentActionGroup" stepKey="assertingShipToInformationOnPaymentPage"/> |
| 66 | + <!-- Assert Shipping Method = "Flat Rate" --> |
| 67 | + <waitForText userInput="Flat Rate - Fixed" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertShippingMethodAgain"/> |
| 68 | + <!-- click on Edit button next to "Ship To" Text --> |
| 69 | + <waitForElementVisible selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="waitForEditButtonToBeVisible"/> |
| 70 | + <click selector="{{CheckoutPaymentSection.editShipToAddress}}" stepKey="clickOnEditButton"/> |
| 71 | + <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="guestCheckoutFillingShippingSectionAgain"> |
| 72 | + <argument name="customerVar" value="CustomerEntityOne"/> |
| 73 | + <argument name="customerAddressVar" value="CustomerAddressSimple"/> |
| 74 | + </actionGroup> |
| 75 | + <!-- Check that "Ship To" block contains correct information --> |
| 76 | + <actionGroup ref="GuestVerifiesTheShipToDetailsOnStorefrontCheckoutPaymentActionGroup" stepKey="againAssertingShipToInformationOnPaymentPage"/> |
| 77 | + <!-- Assert Shipping Method = "Free Shipping" --> |
| 78 | + <waitForText userInput="Free Shipping - Free" selector="{{CheckoutPaymentSection.orderSummaryShippingMethod}}" stepKey="assertFreeShippingMethod"/> |
| 79 | + <!-- click on Edit button next to "Shipping Method" Text --> |
| 80 | + <waitForElementVisible selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="waitForEditButtonToVisible"/> |
| 81 | + <click selector="{{CheckoutPaymentSection.editShippingMethod}}" stepKey="clickOnEditShippingMethodButton"/> |
| 82 | + <!-- Assert that it has scrolled to Shipping Method text --> |
| 83 | + <scrollTo selector="{{CheckoutPaymentSection.shippingMethodTitle}}" stepKey="scrollToShippingMethodTitle"/> |
| 84 | + <waitForText selector="{{CheckoutPaymentSection.shippingMethodTitle}}" userInput="Shipping Methods" stepKey="assertShippingMethodTitle"/> |
| 85 | + </test> |
| 86 | +</tests> |
0 commit comments