|
| 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="StorefrontCheckoutShippingToMultipleAddressesIfMaximumQtyLimitWasReachedTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Sales"/> |
| 14 | + <stories value="Order Placement With Maximum QTY Limit for Shipping To Multiple Addresses"/> |
| 15 | + <title value="Maximum QTY Limit for Shipping To Multiple Addresses Was Reached"/> |
| 16 | + <description value="Customer should not be able ship to multiple addresses if Maximum QTY limit was reached in shopping cart"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <group value="checkout"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set {{MaximumQtyAllowed2ForShippingToMultipleAddressesConfigData.path}} {{MaximumQtyAllowed2ForShippingToMultipleAddressesConfigData.value}}" stepKey="setMaximumQty2"/> |
| 22 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 23 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 24 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 25 | + <requiredEntity createDataKey="createCategory"/> |
| 26 | + </createData> |
| 27 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 28 | + <argument name="tags" value="config full_page"/> |
| 29 | + </actionGroup> |
| 30 | + </before> |
| 31 | + <after> |
| 32 | + <magentoCLI command="config:set {{MaximumQtyAllowed100ForShippingToMultipleAddressesConfigData.path}} {{MaximumQtyAllowed100ForShippingToMultipleAddressesConfigData.value}}" stepKey="setDefaultMaximumQty"/> |
| 33 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 34 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 35 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
| 36 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 37 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> |
| 38 | + <argument name="tags" value="config full_page"/> |
| 39 | + </actionGroup> |
| 40 | + </after> |
| 41 | + |
| 42 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 43 | + <argument name="Customer" value="$createCustomer$"/> |
| 44 | + </actionGroup> |
| 45 | + <actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory"> |
| 46 | + <argument name="category" value="$createCategory$"/> |
| 47 | + <argument name="product" value="$createProduct$"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addProductToTheCart"> |
| 50 | + <argument name="productQty" value="1"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateToCartPage"/> |
| 53 | + <actionGroup ref="AssertStorefrontMultiShippingOptionIsPresentOnShoppingCartPageActionGroup" stepKey="assertMultiCheckoutAvailable"/> |
| 54 | + <actionGroup ref="StorefrontUpdateProductQTYOnShoppingCartPageActionGroup" stepKey="updateProductQty"> |
| 55 | + <argument name="product" value="$createProduct.name$"/> |
| 56 | + <argument name="qty" value="3"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="assertMultiCheckoutIsNotAvailable"/> |
| 59 | + </test> |
| 60 | +</tests> |
0 commit comments