Skip to content

Commit

Permalink
Merge branch '2.4-develop' into mftf-cron/magento-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
lbajsarowicz authored Mar 21, 2020
2 parents 7ab256f + a95a465 commit e79ee1e
Show file tree
Hide file tree
Showing 39 changed files with 1,304 additions and 712 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?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="AdminCreateAndEditBundleProductOptionsNegativeTest">
<annotations>
<features value="Bundle"/>
<stories value="Modify bundle product in Admin"/>
<title value="Admin should be able to remove any bundle option a bundle product"/>
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/>
<severity value="MAJOR"/>
<testCaseId value="MC-224"/>
<skip>
<issueId value="https://github.com/magento/magento2/issues/25468"/>
</skip>
<group value="Catalog"/>
</annotations>
<before>
<!-- Create a Website -->
<createData entity="customWebsite" stepKey="createWebsite"/>

<!-- Create first simple product for a bundle option -->
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/>

<!-- Create second simple product for a bundle option -->
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<!-- Delete the simple product -->
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>

<!-- Delete the simple product -->
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>

<!-- Delete a Website -->
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
<argument name="websiteName" value="Second Website"/>
</actionGroup>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<!-- Create new bundle product -->
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct">
<argument name="productType" value="bundle"/>
</actionGroup>

<!-- Fill all main fields -->
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/>

<!-- Add first bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption">
<argument name="x" value="0"/>
<argument name="n" value="1"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
</actionGroup>

<!-- Add second bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addSecondBundleOption">
<argument name="x" value="1"/>
<argument name="n" value="2"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
<argument name="inputType" value="{{CheckboxOption.type}}"/>
</actionGroup>

<!-- Add third bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addThirdBundleOption">
<argument name="x" value="2"/>
<argument name="n" value="3"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
</actionGroup>

<!-- Set product in created Website -->
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites">
<argument name="website" value="$createWebsite.website[name]$"/>
</actionGroup>

<!-- Save product form -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>

<!-- Open created product -->
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>

<!-- Remove second option -->
<actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption">
<argument name="deleteIndex" value="1"/>
</actionGroup>

<!-- Save product form -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/>
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>

<!-- Delete created bundle product -->
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -136,119 +136,6 @@
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
<dontSeeElement selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="dontSeeGiftOptionBtn"/>

<!-- Delete created bundle product -->
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
</test>
<test name="AdminCreateAndEditBundleProductOptionsNegativeTest">
<annotations>
<features value="Bundle"/>
<stories value="Modify bundle product in Admin"/>
<title value="Admin should be able to remove any bundle option a bundle product"/>
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/>
<severity value="MAJOR"/>
<testCaseId value="MC-224"/>
<skip>
<issueId value="https://github.com/magento/magento2/issues/25468"/>
</skip>
<group value="Catalog"/>
</annotations>
<before>
<!-- Create a Website -->
<createData entity="customWebsite" stepKey="createWebsite"/>

<!-- Create first simple product for a bundle option -->
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/>

<!-- Create second simple product for a bundle option -->
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>

<magentoCron stepKey="runCronIndex" groups="index"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>
<after>
<!-- Delete the simple product -->
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>

<!-- Delete the simple product -->
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>

<!-- Delete a Website -->
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
<argument name="websiteName" value="Second Website"/>
</actionGroup>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>

<!-- Create new bundle product -->
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct">
<argument name="productType" value="bundle"/>
</actionGroup>

<!-- Fill all main fields -->
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/>

<!-- Add first bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption">
<argument name="x" value="0"/>
<argument name="n" value="1"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
</actionGroup>

<!-- Add second bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addSecondBundleOption">
<argument name="x" value="1"/>
<argument name="n" value="2"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
<argument name="inputType" value="{{CheckboxOption.type}}"/>
</actionGroup>

<!-- Add third bundle option to the product -->
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addThirdBundleOption">
<argument name="x" value="2"/>
<argument name="n" value="3"/>
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
</actionGroup>

<!-- Set product in created Website -->
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites">
<argument name="website" value="$createWebsite.website[name]$"/>
</actionGroup>

<!-- Save product form -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>

<!-- Open created product -->
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>

<!-- Remove second option -->
<actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption">
<argument name="deleteIndex" value="1"/>
</actionGroup>

<!-- Save product form -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/>
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>

<!-- Delete created bundle product -->
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
<argument name="product" value="BundleProduct"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?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="AdvanceCatalogSearchBundleByDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
<annotations>
<features value="Bundle"/>
<stories value="Advanced Catalog Product Search for all product types"/>
<title value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/>
<description value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/>
<severity value="MAJOR"/>
<testCaseId value="MC-20473"/>
<group value="Bundle"/>
<group value="SearchEngineMysql"/>
</annotations>
<before>
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
<createData entity="ApiBundleProduct" stepKey="product"/>
<createData entity="DropDownBundleOption" stepKey="bundleOption">
<requiredEntity createDataKey="product"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple1"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple2"/>
</createData>

<magentoCron stepKey="runCronReindex" groups="index"/>
</before>
<after>
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
</test>
</tests>
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="AdvanceCatalogSearchBundleByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
<annotations>
<features value="Bundle"/>
<stories value="Advanced Catalog Product Search for all product types"/>
<title value="Guest customer should be able to advance search Bundle product with product description"/>
<description value="Guest customer should be able to advance search Bundle product with product description"/>
<severity value="MAJOR"/>
<testCaseId value="MC-242"/>
<group value="Bundle"/>
<group value="SearchEngineElasticsearch"/>
</annotations>
<before>
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
<createData entity="ApiBundleProduct" stepKey="product"/>
<createData entity="DropDownBundleOption" stepKey="bundleOption">
<requiredEntity createDataKey="product"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple1"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple2"/>
</createData>

<magentoCron stepKey="runCronReindex" groups="index"/>
</before>
<after>
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
</test>
</tests>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?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="AdvanceCatalogSearchBundleByNameMysqlTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
<annotations>
<features value="Bundle"/>
<stories value="Advanced Catalog Product Search for all product types"/>
<title value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/>
<description value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/>
<severity value="MAJOR"/>
<testCaseId value="MC-20472"/>
<group value="Bundle"/>
<group value="SearchEngineMysql"/>
</annotations>
<before>
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
<createData entity="ApiBundleProduct" stepKey="product"/>
<createData entity="DropDownBundleOption" stepKey="bundleOption">
<requiredEntity createDataKey="product"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple1"/>
</createData>
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
<requiredEntity createDataKey="product"/>
<requiredEntity createDataKey="bundleOption"/>
<requiredEntity createDataKey="simple2"/>
</createData>

<magentoCron stepKey="runCronReindex" groups="index"/>
</before>
<after>
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
</after>
</test>
</tests>
Loading

0 comments on commit e79ee1e

Please sign in to comment.