|
| 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="StoreFrontRemoveItemFromMultishipmentCartTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Multishipping"/> |
| 14 | + <stories value="Remove Item one by one from Multiple Shipping with three different addresses"/> |
| 15 | + <title value="Remove Item one by one from Multiple Shipping with three different addresses"/> |
| 16 | + <description value="Remove Item one by one from Multiple Shipping with three different addresses."/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="AC-2776"/> |
| 19 | + <useCaseId value="ACP2E-693"/> |
| 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="Customer_US_UK_DE" stepKey="createCustomerWithMultipleAddresses"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <!-- Delete created data --> |
| 34 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 35 | + <deleteData createDataKey="firstProduct" stepKey="deleteFirstProduct"/> |
| 36 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 37 | + <deleteData createDataKey="createCustomerWithMultipleAddresses" stepKey="deleteCustomer"/> |
| 38 | + </after> |
| 39 | + <!-- Login to the Storefront as created customer --> |
| 40 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> |
| 41 | + <argument name="Customer" value="$$createCustomerWithMultipleAddresses$$"/> |
| 42 | + </actionGroup> |
| 43 | + <!-- Open the simple product page --> |
| 44 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToProductPage"> |
| 45 | + <argument name="productUrl" value="$$firstProduct.custom_attributes[url_key]$$"/> |
| 46 | + </actionGroup> |
| 47 | + <!-- Add to Cart three times of the product --> |
| 48 | + <actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> |
| 49 | + <argument name="productName" value="$$firstProduct.name$$"/> |
| 50 | + <argument name="productQty" value="3"/> |
| 51 | + </actionGroup> |
| 52 | + <!--Go to Cart --> |
| 53 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCartWithIdenticalProducts"/> |
| 54 | + <!--Check Out with Multiple Addresses --> |
| 55 | + <actionGroup ref="StorefrontCheckoutWithMultipleAddressesActionGroup" stepKey="checkoutWithThreeDifferentAddresses"/> |
| 56 | + <!-- Select different addresses and click 'Go to Shipping Information' --> |
| 57 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectFirstAddressFromThree"> |
| 58 | + <argument name="sequenceNumber" value="1"/> |
| 59 | + <argument name="option" value="John Doe, 368 Broadway St. 113, New York, New York 10001, United States"/> |
| 60 | + </actionGroup> |
| 61 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectSecondAddressFromThree"> |
| 62 | + <argument name="sequenceNumber" value="2"/> |
| 63 | + <argument name="option" value="John Doe, Augsburger Strabe 41, Berlin, 10789, Germany"/> |
| 64 | + </actionGroup> |
| 65 | + <actionGroup ref="StorefrontSelectAddressActionGroup" stepKey="selectThirdAddressFromThree"> |
| 66 | + <argument name="sequenceNumber" value="3"/> |
| 67 | + <argument name="option" value="Jane Doe, 172, Westminster Bridge Rd, London, SE1 7RW, United Kingdom"/> |
| 68 | + </actionGroup> |
| 69 | + <!-- Save updated addresses --> |
| 70 | + <actionGroup ref="StorefrontMultiShippingSaveAddressActionGroup" stepKey="saveThreeDifferentAddresses"/> |
| 71 | + <!-- Verify there are 3 items available on cart page --> |
| 72 | + <seeNumberOfElements userInput="3" selector="a.action.delete" stepKey="seeThreeItems"/> |
| 73 | + <!-- Remove first simple item from cart --> |
| 74 | + <actionGroup ref="StorefrontRemoveProductOnCheckoutActionGroup" stepKey="removeFirstItemFromCart"/> |
| 75 | + <waitForPageLoad time="30" stepKey="waitForCartSummaryPageToLoadAfterRemovalOfFirstItem"/> |
| 76 | + <!-- Verify there are 2 items still available after removal of first --> |
| 77 | + <seeNumberOfElements userInput="2" selector="a.action.delete" stepKey="seeTwoItems"/> |
| 78 | + <!-- Remove second simple item from cart --> |
| 79 | + <actionGroup ref="StorefrontRemoveProductOnCheckoutActionGroup" stepKey="removeSecondItemFromCart"/> |
| 80 | + <waitForPageLoad time="30" stepKey="waitForCartSummaryPageToLoadAfterRemovalOfSecondItem"/> |
| 81 | + <!-- Verify there are 1 items still available after removal of second --> |
| 82 | + <seeNumberOfElements userInput="1" selector="a.action.delete" stepKey="seeOneItems"/> |
| 83 | + <!-- Remove third simple item from cart --> |
| 84 | + <actionGroup ref="StorefrontRemoveProductOnCheckoutActionGroup" stepKey="removeThirdItemFromCart"/> |
| 85 | + <waitForPageLoad time="30" stepKey="waitForCartSummaryPageToLoadAfterRemovalOfTestItem"/> |
| 86 | + </test> |
| 87 | +</tests> |
0 commit comments