|
| 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="StorefrontCheckoutMiniCartSubtotalMatchesAfterRemoveOneProductFromCartTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Multishipping"/> |
| 14 | + <stories value="Multiple Shipping"/> |
| 15 | + <title value="Check mini shopping cart Subtotal Price matches with the View Cart subtotal price after remove one product from cart"/> |
| 16 | + <description value="Verify mini shopping cart Subtotal Price matches with the View Cart subtotal price after remove one product from cart"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-3652"/> |
| 19 | + <useCaseId value="AC-3652"/> |
| 20 | + <group value="Multishipment"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Login as Admin --> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 25 | + <!-- Create simple products --> |
| 26 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 27 | + <createData entity="SimpleProduct" stepKey="firstProduct"> |
| 28 | + <requiredEntity createDataKey="createCategory"/> |
| 29 | + </createData> |
| 30 | + <createData entity="SimpleProduct" stepKey="secondProduct"> |
| 31 | + <requiredEntity createDataKey="createCategory"/> |
| 32 | + </createData> |
| 33 | + <createData entity="Customer_US_UK_DE" stepKey="createCustomerWithMultipleAddresses"/> |
| 34 | + </before> |
| 35 | + <after> |
| 36 | + <!-- Delete created data --> |
| 37 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 38 | + <deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/> |
| 39 | + <deleteData createDataKey="secondProduct" stepKey="deleteSecondProduct"/> |
| 40 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 41 | + <deleteData createDataKey="createCustomerWithMultipleAddresses" stepKey="deleteCustomer"/> |
| 42 | + </after> |
| 43 | + <!-- Login to the Storefront as created customer --> |
| 44 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 45 | + <argument name="Customer" value="$$createCustomerWithMultipleAddresses$$"/> |
| 46 | + </actionGroup> |
| 47 | + <!-- Open the first product page --> |
| 48 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToFirstProductPage"> |
| 49 | + <argument name="productUrl" value="$$firstProduct.custom_attributes[url_key]$$"/> |
| 50 | + </actionGroup> |
| 51 | + <!-- Add the first product to the Shopping Cart --> |
| 52 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addFirstProductToCart"> |
| 53 | + <argument name="productName" value="$$firstProduct.name$$"/> |
| 54 | + <argument name="productQty" value="1"/> |
| 55 | + </actionGroup> |
| 56 | + <!-- Open the second product page --> |
| 57 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToSecondProductPage"> |
| 58 | + <argument name="productUrl" value="$$secondProduct.custom_attributes[url_key]$$"/> |
| 59 | + </actionGroup> |
| 60 | + <!-- Add the second product to the Shopping Cart --> |
| 61 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addSecondProductToCart"> |
| 62 | + <argument name="productName" value="$$secondProduct.name$$"/> |
| 63 | + <argument name="productQty" value="1"/> |
| 64 | + </actionGroup> |
| 65 | + <!--Go to Cart --> |
| 66 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> |
| 67 | + <!--Check Out with Multiple Addresses --> |
| 68 | + <actionGroup ref="StorefrontCheckoutWithMultipleAddressesActionGroup" stepKey="checkoutWithMultipleAddresses"/> |
| 69 | + <!-- Select different addresses and click 'Go to Shipping Information' --> |
| 70 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectFirstAddress"> |
| 71 | + <argument name="sequenceNumber" value="1"/> |
| 72 | + <argument name="option" value="John Doe, 368 Broadway St. 113, New York, New York 10001, United States"/> |
| 73 | + </actionGroup> |
| 74 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectSecondAddress"> |
| 75 | + <argument name="sequenceNumber" value="2"/> |
| 76 | + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> |
| 77 | + </actionGroup> |
| 78 | + <actionGroup ref="StorefrontSaveAddressActionGroup" stepKey="saveAddresses"/> |
| 79 | + <!-- Open the second product page --> |
| 80 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToSecondProductPage1"> |
| 81 | + <argument name="productUrl" value="$$secondProduct.custom_attributes[url_key]$$"/> |
| 82 | + </actionGroup> |
| 83 | + <actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/> |
| 84 | + <click selector="{{StorefrontMinicartSection.deleteMiniCartItem}}" stepKey="deleteMiniCartItem"/> |
| 85 | + <waitForElementVisible selector="{{StoreFrontRemoveItemModalSection.message}}" stepKey="waitFortheConfirmationModal"/> |
| 86 | + <see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/> |
| 87 | + <click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/> |
| 88 | + <waitForPageLoad stepKey="waitForDeleteToFinish"/> |
| 89 | + <actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal"> |
| 90 | + <argument name="subtotal" value="$123.00"/> |
| 91 | + </actionGroup> |
| 92 | + </test> |
| 93 | +</tests> |
0 commit comments