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#110 from magento-pangolin/MC-4466
- Loading branch information
Showing
6 changed files
with
700 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
...Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.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,91 @@ | ||
<?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="StorefrontDeleteBundleProductFromMiniShoppingCartTest"> | ||
<annotations> | ||
<stories value="DeleteBundleProduct"/> | ||
<title value="Storefront Delete Bundle Product From Mini Shopping Cart Test"/> | ||
<description value="Test log in to Shopping Cart and Delete Bundle Product From Mini Shopping Cart Test"/> | ||
<testCaseId value="MC-14682"/> | ||
<severity value="CRITICAL"/> | ||
<group value="Shopping Cart"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/> | ||
<createData entity="SimpleSubCategory" stepKey="createSubCategory"/> | ||
<!--Create simple product--> | ||
<createData entity="SimpleProduct2" stepKey="simpleProduct1"> | ||
<field key="price">10.00</field> | ||
</createData> | ||
<!--Create Bundle product--> | ||
<createData entity="BundleProductPriceViewRange" stepKey="createBundleProduct"> | ||
<requiredEntity createDataKey="createSubCategory"/> | ||
</createData> | ||
<createData entity="DropDownBundleOption" stepKey="createBundleOption1_1"> | ||
<requiredEntity createDataKey="createBundleProduct"/> | ||
<field key="required">True</field> | ||
</createData> | ||
<createData entity="ApiBundleLink" stepKey="linkOptionToProduct"> | ||
<requiredEntity createDataKey="createBundleProduct"/> | ||
<requiredEntity createDataKey="createBundleOption1_1"/> | ||
<requiredEntity createDataKey="simpleProduct1"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/> | ||
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/> | ||
<deleteData createDataKey="createSubCategory" stepKey="deleteCategory"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Open Product page in StoreFront --> | ||
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageByCustomAttributeUrlKey" stepKey="openProductPageAndVerifyProduct"> | ||
<argument name="product" value="$$createBundleProduct$$"/> | ||
</actionGroup> | ||
|
||
<!-- Click on customize And Add To Cart Button --> | ||
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickOnCustomizeAndAddtoCartButton"/> | ||
|
||
<!-- Select Product Quantity and add to the cart --> | ||
<actionGroup ref="StorefrontEnterProductQuantityAndAddToTheCartActionGroup" stepKey="enterProductQuantityAndAddToTheCart"> | ||
<argument name="quantity" value="1"/> | ||
</actionGroup> | ||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||
<waitForPageLoad stepKey="waitForMiniCartPanelToAppear"/> | ||
|
||
<!-- Assert Product in Mini Cart --> | ||
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/> | ||
<waitForPageLoad stepKey="waitForPageToLoad1"/> | ||
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertSimpleProduct3MiniCart"> | ||
<argument name="productName" value="$$createBundleProduct.name$$"/> | ||
<argument name="productPrice" value="$10.00"/> | ||
<argument name="cartSubtotal" value="$10.00" /> | ||
<argument name="qty" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Select Mini Cart and select 'View And Edit Cart' --> | ||
<actionGroup ref="assertOneProductNameInMiniCart" stepKey="seeProductInMiniCart"> | ||
<argument name="productName" value="$$createBundleProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!--Remove an item from the cart using minicart--> | ||
<actionGroup ref="removeProductFromMiniCart" stepKey="removeProductFromMiniCart"> | ||
<argument name="productName" value="$$createBundleProduct.name$$"/> | ||
</actionGroup> | ||
<reloadPage stepKey="reloadPage"/> | ||
|
||
<!--Check the minicart is empty and verify AssertProductAbsentInMiniShoppingCart--> | ||
<actionGroup ref="assertMiniCartEmpty" stepKey="miniCartEnpty"/> | ||
<dontSee selector="{{StorefrontMinicartSection.productLinkByName($$createBundleProduct.name$$)}}" stepKey="verifyAssertProductAbsentInMiniShoppingCart"/> | ||
</test> | ||
</tests> |
100 changes: 100 additions & 0 deletions
100
...o/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.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,100 @@ | ||
<?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="StorefrontDeleteConfigurableProductFromMiniShoppingCartTest"> | ||
<annotations> | ||
<stories value="DeleteConfigurableProduct"/> | ||
<title value="Storefront Delete Configurable Product From Mini Shopping Cart Test"/> | ||
<description value="Test log in to Shopping Cart and Delete Configurable Product From Mini Shopping Cart Test"/> | ||
<testCaseId value="MC-14681"/> | ||
<severity value="CRITICAL"/> | ||
<group value="Shopping Cart"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
<!-- Create Default Category --> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
|
||
<!-- Create an attribute with three options to be used in the first child product --> | ||
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> | ||
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
|
||
<!-- Add the attribute just created to default attribute set --> | ||
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
|
||
<!-- Get the first option of the attribute created --> | ||
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
|
||
<!-- Create Configurable product --> | ||
<createData entity="BaseConfigurableProduct" stepKey="createConfigProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Create a simple product and give it the attribute with the first option --> | ||
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct1"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption1"/> | ||
<field key="price">10.00</field> | ||
</createData> | ||
|
||
<!-- Create the configurable product --> | ||
<createData entity="ConfigurableProductThreeOptions" stepKey="createConfigProductOption"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption1"/> | ||
</createData> | ||
|
||
<!-- Add the first simple product to the configurable product --> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct1"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createConfigChildProduct1" stepKey="deleteSimpleProduct1"/> | ||
<deleteData createDataKey="createConfigProduct" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteProductAttribute"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</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="$$getConfigAttributeOption1.label$$"/> | ||
<argument name="qty" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Select Mini Cart and select 'View And Edit Cart' --> | ||
<actionGroup ref="assertOneProductNameInMiniCart" stepKey="seeProductInMiniCart"> | ||
<argument name="productName" value="$$createConfigProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!--Remove an item from the cart using minicart--> | ||
<actionGroup ref="removeProductFromMiniCart" stepKey="removeProductFromMiniCart"> | ||
<argument name="productName" value="$$createConfigProduct.name$$"/> | ||
</actionGroup> | ||
<reloadPage stepKey="reloadPage"/> | ||
|
||
<!--Check the minicart is empty and verify AssertProductAbsentInMiniShoppingCart--> | ||
<actionGroup ref="assertMiniCartEmpty" stepKey="miniCartEnpty"/> | ||
<dontSee selector="{{StorefrontMinicartSection.productLinkByName($$createConfigProduct.name$$)}}" stepKey="verifyAssertProductAbsentInMiniShoppingCart"/> | ||
</test> | ||
</tests> |
73 changes: 73 additions & 0 deletions
73
...o/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.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,73 @@ | ||
<?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="StorefrontDeleteDownloadableProductFromMiniShoppingCartTest"> | ||
<annotations> | ||
<stories value="DeleteConfigurableProduct"/> | ||
<title value="Storefront Delete Downloadable Product From Mini Shopping Cart Test"/> | ||
<description value="Test log in to Shopping Cart and Delete Downloadable Product From Mini Shopping Cart Test"/> | ||
<testCaseId value="MC-14683"/> | ||
<severity value="CRITICAL"/> | ||
<group value="Shopping Cart"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/> | ||
<createData entity="ApiDownloadableProduct" stepKey="createDownloadableProduct"/> | ||
<createData entity="downloadableLink1" stepKey="addDownloadableLink1"> | ||
<requiredEntity createDataKey="createDownloadableProduct"/> | ||
</createData> | ||
<magentoCLI command="indexer:reindex" stepKey="reindex"/> | ||
<magentoCLI command="cache:flush" stepKey="flushCache"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createDownloadableProduct" stepKey="deleteProduct"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Open Downloadable Product page --> | ||
<amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.custom_attributes[url_key]$$)}}" stepKey="OpenStoreFrontProductPage"/> | ||
<waitForPageLoad stepKey="waitForPageToLoad"/> | ||
|
||
<!-- Add Downloadable product to the cart --> | ||
<actionGroup ref="StorefrontAddToCartCustomOptionsProductPageActionGroup" stepKey="addToTheCart"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$" /> | ||
</actionGroup> | ||
|
||
<!-- Select Mini Cart and select 'View And Edit Cart' --> | ||
<actionGroup ref="clickViewAndEditCartFromMiniCart" stepKey="selectViewAndEditCart"/> | ||
|
||
<!-- Assert product details in Mini Cart --> | ||
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickOnMiniCart"/> | ||
<waitForPageLoad stepKey="waitForPageToLoad1"/> | ||
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="assertMiniCart"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
<argument name="productPrice" value="$123.00"/> | ||
<argument name="cartSubtotal" value="123.00" /> | ||
<argument name="qty" value="1"/> | ||
</actionGroup> | ||
|
||
<!-- Select Mini Cart and select 'View And Edit Cart' --> | ||
<actionGroup ref="assertOneProductNameInMiniCart" stepKey="seeProductInMiniCart"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
</actionGroup> | ||
|
||
<!--Remove an item from the cart using minicart--> | ||
<actionGroup ref="removeProductFromMiniCart" stepKey="removeProductFromMiniCart"> | ||
<argument name="productName" value="$$createDownloadableProduct.name$$"/> | ||
</actionGroup> | ||
<reloadPage stepKey="reloadPage"/> | ||
|
||
<!--Check the minicart is empty and verify AssertProductAbsentInMiniShoppingCart--> | ||
<actionGroup ref="assertMiniCartEmpty" stepKey="miniCartEnpty"/> | ||
<dontSee selector="{{StorefrontMinicartSection.productLinkByName($$createDownloadableProduct.name$$)}}" stepKey="verifyAssertProductAbsentInMiniShoppingCart"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.