diff --git a/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontUpdateProductQTYOnShoppingCartPageActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontUpdateProductQTYOnShoppingCartPageActionGroup.xml new file mode 100644 index 0000000000000..7da9e4e8030e4 --- /dev/null +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontUpdateProductQTYOnShoppingCartPageActionGroup.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml index 2f29065597675..e0b2b7c2e6c13 100644 --- a/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml @@ -38,5 +38,6 @@ + diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup.xml new file mode 100644 index 0000000000000..018e979a63228 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsPresentOnShoppingCartPageActionGroup.xml b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsPresentOnShoppingCartPageActionGroup.xml new file mode 100644 index 0000000000000..8f766cd401cd4 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/ActionGroup/AssertStorefrontMultiShippingOptionIsPresentOnShoppingCartPageActionGroup.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/app/code/Magento/Multishipping/Test/Mftf/Data/MultishippingConfigData.xml b/app/code/Magento/Multishipping/Test/Mftf/Data/MultishippingConfigData.xml new file mode 100644 index 0000000000000..b4ce98b1e8ad7 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Data/MultishippingConfigData.xml @@ -0,0 +1,20 @@ + + + + + + multishipping/options/checkout_multiple_maximum_qty + 2 + + + + multishipping/options/checkout_multiple_maximum_qty + 100 + + diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutShippingToMultipleAddressesIfMaximumQtyLimitWasReachedTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutShippingToMultipleAddressesIfMaximumQtyLimitWasReachedTest.xml new file mode 100644 index 0000000000000..5a6c674719170 --- /dev/null +++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutShippingToMultipleAddressesIfMaximumQtyLimitWasReachedTest.xml @@ -0,0 +1,60 @@ + + + + + + + + + + <description value="Customer should not be able ship to multiple addresses if Maximum QTY limit was reached in shopping cart"/> + <severity value="MAJOR"/> + <group value="checkout"/> + </annotations> + <before> + <magentoCLI command="config:set {{MaximumQtyAllowed2ForShippingToMultipleAddressesConfigData.path}} {{MaximumQtyAllowed2ForShippingToMultipleAddressesConfigData.value}}" stepKey="setMaximumQty2"/> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> + <argument name="tags" value="config full_page"/> + </actionGroup> + </before> + <after> + <magentoCLI command="config:set {{MaximumQtyAllowed100ForShippingToMultipleAddressesConfigData.path}} {{MaximumQtyAllowed100ForShippingToMultipleAddressesConfigData.value}}" stepKey="setDefaultMaximumQty"/> + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches"> + <argument name="tags" value="config full_page"/> + </actionGroup> + </after> + + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> + <argument name="Customer" value="$createCustomer$"/> + </actionGroup> + <actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory"> + <argument name="category" value="$createCategory$"/> + <argument name="product" value="$createProduct$"/> + </actionGroup> + <actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addProductToTheCart"> + <argument name="productQty" value="1"/> + </actionGroup> + <actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="navigateToCartPage"/> + <actionGroup ref="AssertStorefrontMultiShippingOptionIsPresentOnShoppingCartPageActionGroup" stepKey="assertMultiCheckoutAvailable"/> + <actionGroup ref="StorefrontUpdateProductQTYOnShoppingCartPageActionGroup" stepKey="updateProductQty"> + <argument name="product" value="$createProduct.name$"/> + <argument name="qty" value="3"/> + </actionGroup> + <actionGroup ref="AssertStorefrontMultiShippingOptionIsNotPresentOnShoppingCartPageActionGroup" stepKey="assertMultiCheckoutIsNotAvailable"/> + </test> +</tests>