forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request magento#106 from magento-pangolin/MC-4462
MC-4462
- Loading branch information
Showing
9 changed files
with
403 additions
and
6 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
app/code/Magento/Checkout/Test/Mftf/ActionGroup/DeleteProductFromShoppingCartActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details.z | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="DeleteProductFromShoppingCartActionGroup"> | ||
<arguments> | ||
<argument name="productName" type="string"/> | ||
</arguments> | ||
<click selector="{{CheckoutCartProductSection.removeProductByName(productName)}}" stepKey="deleteProductFromCheckoutCart"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleDynamicProductFromShoppingCartTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="DeleteBundleDynamicProductFromShoppingCartTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Delete Products from Shopping Cart"/> | ||
<title value="Delete bundle dynamic product from shopping cart test"/> | ||
<description value="Delete bundle dynamic product from shopping cart"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14689"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create category and simple product --> | ||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
<createData entity="_defaultProduct" stepKey="createSimpleProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Create bundle product --> | ||
<createData entity="ApiBundleProductPriceViewRange" stepKey="createBundleDynamicProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="DropDownBundleOption" stepKey="bundleOption"> | ||
<requiredEntity createDataKey="createBundleDynamicProduct"/> | ||
</createData> | ||
<createData entity="ApiBundleLink" stepKey="createNewBundleLink"> | ||
<requiredEntity createDataKey="createBundleDynamicProduct"/> | ||
<requiredEntity createDataKey="bundleOption"/> | ||
<requiredEntity createDataKey="createSimpleProduct"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
</before> | ||
<after> | ||
<!-- Delete category --> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
|
||
<!-- Delete bundle product data --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createBundleDynamicProduct" stepKey="deleteBundleProduct"/> | ||
</after> | ||
|
||
<!-- Go to bundle product page --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createBundleDynamicProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
|
||
<!-- Add product to the cart --> | ||
<click selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="clickCustomizeAndAddToCart"/> | ||
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addProductToCart"> | ||
<argument name="productName" value="$$createBundleDynamicProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Remove product from cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> | ||
<waitForPageLoad stepKey="waitForCartPageLoad"/> | ||
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteProduct"> | ||
<argument name="productName" value="$$createBundleDynamicProduct.name$$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
61 changes: 61 additions & 0 deletions
61
app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleFixedProductFromShoppingCartTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="DeleteBundleFixedProductFromShoppingCartTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Delete Products from Shopping Cart"/> | ||
<title value="Delete bundle fixed product from shopping cart test"/> | ||
<description value="Delete bundle fixed product from shopping cart"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14690"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create simple product --> | ||
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/> | ||
|
||
<!-- Create bundle product --> | ||
<createData entity="ApiFixedBundleProduct" stepKey="createFixedBundleProduct"/> | ||
<createData entity="DropDownBundleOption" stepKey="createBundleOption"> | ||
<requiredEntity createDataKey="createFixedBundleProduct"/> | ||
</createData> | ||
<createData entity="ApiBundleLink" stepKey="addLinkOptionToBundleProduct"> | ||
<requiredEntity createDataKey="createFixedBundleProduct"/> | ||
<requiredEntity createDataKey="createBundleOption"/> | ||
<requiredEntity createDataKey="createSimpleProduct"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
</before> | ||
<after> | ||
<!-- Delete bundle product data --> | ||
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="createFixedBundleProduct" stepKey="deleteFixedBundleProduct"/> | ||
</after> | ||
|
||
<!-- Go to bundle product page --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createFixedBundleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
|
||
<!-- Add product to the cart --> | ||
<click selector="{{StorefrontBundleProductActionSection.customizeAndAddToCartButton}}" stepKey="clickCustomizeAndAddToCart"/> | ||
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addProductToCart"> | ||
<argument name="productName" value="$$createFixedBundleProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Remove product from cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> | ||
<waitForPageLoad stepKey="waitForCartPageLoad"/> | ||
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteProduct"> | ||
<argument name="productName" value="$$createFixedBundleProduct.name$$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
80 changes: 80 additions & 0 deletions
80
app/code/Magento/Checkout/Test/Mftf/Test/DeleteConfigurableProductFromShoppingCartTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="DeleteConfigurableProductFromShoppingCartTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Delete Products from Shopping Cart"/> | ||
<title value="Delete configurable product from shopping cart test"/> | ||
<description value="Delete configurable product from shopping cart"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14692"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create category --> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
|
||
<!-- Create configurable product --> | ||
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> | ||
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
</createData> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<!-- Delete configurable product data --> | ||
<deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/> | ||
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> | ||
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> | ||
|
||
<!-- Delete category --> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!-- Add configurable product to the cart --> | ||
<actionGroup ref="StorefrontAddConfigurableProductToTheCartActionGroup" stepKey="addConfigurableProductToCart"> | ||
<argument name="urlKey" value="$$createConfigProduct.custom_attributes[url_key]$$" /> | ||
<argument name="productAttribute" value="$$createConfigProductAttribute.default_value$$"/> | ||
<argument name="productOption" value="$$getConfigAttributeOption.value$$"/> | ||
<argument name="qty" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Remove product from cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> | ||
<waitForPageLoad stepKey="waitForCartPageLoad"/> | ||
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteProduct"> | ||
<argument name="productName" value="$$createConfigProduct.name$$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
51 changes: 51 additions & 0 deletions
51
app/code/Magento/Checkout/Test/Mftf/Test/DeleteDownloadableProductFromShoppingCartTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="DeleteDownloadableProductFromShoppingCartTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Delete Products from Shopping Cart"/> | ||
<title value="Delete downloadable product from shopping cart test"/> | ||
<description value="Delete downloadable product from shopping cart"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14693"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create downloadable product --> | ||
<createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/> | ||
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink"> | ||
<requiredEntity createDataKey="createDownloadableProduct"/> | ||
</createData> | ||
<createData entity="ApiDownloadableLink" stepKey="addDownloadableLink1"> | ||
<requiredEntity createDataKey="createDownloadableProduct"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<!-- Delete downloadable product --> | ||
<deleteData createDataKey="createDownloadableProduct" stepKey="deleteDownloadableProduct"/> | ||
</after> | ||
|
||
<!-- Add downloadable product to the cart --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToDownloadableProductPage"/> | ||
<waitForPageLoad stepKey="waitForDownloadableProductPageLoad"/> | ||
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartDownloadableProductFromStorefrontProductPage"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Remove product from cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> | ||
<waitForPageLoad stepKey="waitForCartPageLoad"/> | ||
<actionGroup ref="DeleteProductFromShoppingCartActionGroup" stepKey="deleteProduct"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
69 changes: 69 additions & 0 deletions
69
app/code/Magento/Checkout/Test/Mftf/Test/DeleteGroupedProductFromShoppingCartTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="DeleteGroupedProductFromShoppingCartTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="Delete Products from Shopping Cart"/> | ||
<title value="Delete grouped product from shopping cart test"/> | ||
<description value="Delete grouped product from shopping cart"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-14694"/> | ||
<group value="checkout"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Create grouped product with three simple products --> | ||
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/> | ||
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/> | ||
<createData entity="SimpleProduct2" stepKey="createThirdSimpleProduct"/> | ||
<createData entity="ApiGroupedProduct" stepKey="createGroupedProduct"/> | ||
<createData entity="OneSimpleProductLink" stepKey="addFirstProductToLink"> | ||
<requiredEntity createDataKey="createGroupedProduct"/> | ||
<requiredEntity createDataKey="createFirstSimpleProduct"/> | ||
</createData> | ||
<updateData entity="OneMoreSimpleProductLink" createDataKey="addFirstProductToLink" stepKey="addSecondProductTwo"> | ||
<requiredEntity createDataKey="createGroupedProduct"/> | ||
<requiredEntity createDataKey="createSecondSimpleProduct"/> | ||
</updateData> | ||
<updateData entity="OneMoreSimpleProductLink" createDataKey="addFirstProductToLink" stepKey="addThirdProductThree"> | ||
<requiredEntity createDataKey="createGroupedProduct"/> | ||
<requiredEntity createDataKey="createThirdSimpleProduct"/> | ||
</updateData> | ||
</before> | ||
<after> | ||
<!-- Delete grouped product data --> | ||
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstProduct"/> | ||
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondProduct"/> | ||
<deleteData createDataKey="createThirdSimpleProduct" stepKey="deleteThirdProduct"/> | ||
<deleteData createDataKey="createGroupedProduct" stepKey="deleteGroupedProduct"/> | ||
</after> | ||
|
||
<!-- Add grouped product to the cart --> | ||
<actionGroup ref="StorefrontAddThreeGroupedProductToTheCartActionGroup" stepKey="addGropedProductsToTheCart"> | ||
<argument name="urlKey" value="$$createGroupedProduct.custom_attributes[url_key]$$"/> | ||
<argument name="product1" value="$$createFirstSimpleProduct.name$$"/> | ||
<argument name="product2" value="$$createSecondSimpleProduct.name$$"/> | ||
<argument name="product3" value="$$createThirdSimpleProduct.name$$"/> | ||
<argument name="qty1" value="1"/> | ||
<argument name="qty2" value="1"/> | ||
<argument name="qty3" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Remove products from cart --> | ||
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/> | ||
<waitForPageLoad stepKey="waitForCartPageLoad"/> | ||
<click selector="{{CheckoutCartProductSection.removeProductByName($$createFirstSimpleProduct.name$$)}}" stepKey="deleteFirstProductFromCheckoutCart"/> | ||
<click selector="{{CheckoutCartProductSection.removeProductByName($$createSecondSimpleProduct.name$$)}}" stepKey="deleteSecondProductFromCheckoutCart"/> | ||
<click selector="{{CheckoutCartProductSection.removeProductByName($$createThirdSimpleProduct.name$$)}}" stepKey="deleteThirdProductFromCheckoutCart"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.