Skip to content

Commit

Permalink
Merge branch '2.4-develop' into Refactoring-CatalogProductListWidgetO…
Browse files Browse the repository at this point in the history
…peratorsTest
  • Loading branch information
kate-kyzyma committed Nov 9, 2021
2 parents c0f7468 + f3e8f25 commit 1b81090
Show file tree
Hide file tree
Showing 339 changed files with 41,460 additions and 45,793 deletions.
121 changes: 71 additions & 50 deletions app/code/Magento/Bundle/Test/Mftf/Test/AdminAddBundleItemsTest.xml

Large diffs are not rendered by default.

Expand Up @@ -52,7 +52,9 @@

<!--Save the product-->
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
<argument name="message" value="You saved the product."/>
</actionGroup>

<actionGroup ref="AddRelatedProductBySkuActionGroup" stepKey="addRelatedProduct1">
<argument name="sku" value="$$simpleProduct1.sku$$"/>
Expand All @@ -63,18 +65,27 @@

<!--Save the product-->
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonAfterEdit"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShownAgain"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShownAgain">
<argument name="message" value="You saved the product."/>
</actionGroup>

<!--See related product in admin-->
<scrollTo selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" stepKey="scrollTo"/>
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee"/>
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct1.name$$" stepKey="seeRelatedProduct"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollTo"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="openDropDownIfClosedRelatedSee"/>
<actionGroup ref="AssertTextInAdminProductRelatedUpSellCrossSellSectionActionGroup" stepKey="seeRelatedProduct">
<argument name="element" value="AdminProductFormRelatedUpSellCrossSellSection.relatedProductSectionText"/>
<argument name="expectedText" value="$$simpleProduct1.name$$"/>
</actionGroup>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!--See related product in storefront-->
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStorefront"/>
<see userInput="$$simpleProduct1.name$$" stepKey="seeRelatedProductInStorefront"/>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="goToStorefront">
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForStorefront"/>
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeRelatedProductInStorefront">
<argument name="productName" value="$$simpleProduct1.name$$"/>
</actionGroup>
</test>
</tests>
Expand Up @@ -37,27 +37,33 @@
</after>

<!--Go to bundle product creation page-->
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" />
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad"/>
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
<argument name="productType" value="{{BundleProduct.type}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad"/>

<!--Create bundle product-->
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
<actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
<argument name="product" value="$$simpleProduct1$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
<argument name="product" value="$$simpleProduct2$$"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItems"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption3"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptions"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillOptionTitle"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectInputType"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToOption"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow2"/>
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts">
<argument name="x" value="0"/>
<argument name="n" value="1"/>
<argument name="prodOneSku" value="$$simpleProduct1.sku$$"/>
<argument name="prodTwoSku" value="$$simpleProduct2.sku$$"/>
<argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/>
<argument name="inputType" value="{{BundleProduct.optionInputType1}}"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty1"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty2"/>

<!--Fill out ancillary data on bundle product-->
<actionGroup ref="AncillaryPrepBundleProductActionGroup" stepKey="createBundledProductForTwoSimpleProducts">
Expand All @@ -66,34 +72,46 @@

<!--Save the product-->
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
<argument name="message" value="You saved the product."/>
</actionGroup>

<!--Creating Second bundle product-->
<!--Go to bundle product creation page-->
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage2" />
<waitForPageLoad stepKey="waitForBundleProductCreatePageToLoad2"/>
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage2">
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
<argument name="productType" value="{{BundleProduct.type}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreatePageToLoad2"/>

<!--Create bundle product 2-->
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems2"/>
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption32"/>
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions2"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle2"/>
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType2"/>
<actionGroup ref="AdminClickAddProductToOptionActionGroup" stepKey="clickAddProductsToOption2"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptionsx2">
<argument name="product" value="$$simpleProduct3$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRowx2"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions22">
<argument name="product" value="$$simpleProduct4$$"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="conditionallyOpenSectionBundleItems2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddOption32"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleOptions2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillOptionTitle2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectInputType2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickAddProductsToOption2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptionsx2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRowx2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="filterBundleProductOptions22"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectFirstGridRow22"/>
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="clickAddSelectedBundleProducts2">
<argument name="x" value="0"/>
<argument name="n" value="1"/>
<argument name="prodOneSku" value="$$simpleProduct3.sku$$"/>
<argument name="prodTwoSku" value="$$simpleProduct4.sku$$"/>
<argument name="optionTitle" value="{{BundleProduct.optionTitle1}}"/>
<argument name="inputType" value="{{BundleProduct.optionInputType1}}"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow22"/>
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts2"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty12"/>
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty22"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty12"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductDefaultQty22"/>

<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName2"/>
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="fillProductSku2"/>
<actionGroup ref="AdminFillProductNameOnProductFormActionGroup" stepKey="fillProductName2">
<argument name="productName" value="{{BundleProduct.name2}}"/>
</actionGroup>
<actionGroup ref="AdminFillProductSkuOnProductFormActionGroup" stepKey="fillProductSku2">
<argument name="productSku" value="{{BundleProduct.sku2}}"/>
</actionGroup>

<!--Trigger SEO drop down-->
<scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="moveToSEOSection"/>
Expand All @@ -104,7 +122,9 @@

<!--Save the product-->
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton2"/>
<see userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown2"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown2">
<argument name="message" value="You saved the product."/>
</actionGroup>

<!--Mass delete bundle products-->
<!--Clear Filters-->
Expand All @@ -123,13 +143,21 @@
<actionGroup ref="ClearPageCacheActionGroup" stepKey="ClearPageCaches"/>

<!--Testing deletion of products-->
<amOnPage url="{{BundleProduct.urlKey}}.html" stepKey="GoToProductPageAgain"/>
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement"/>
<dontSeeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>
<seeElement stepKey="LookingForPageNotFoundMessage" selector="{{StorefrontBundledSection.pageNotFound}}"/>
<amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageAgain2"/>
<waitForPageLoad stepKey="WaitForProductPageToLoadToShowElement2"/>
<dontSeeElement stepKey="LookingForNameOfProduct2" selector="{{StorefrontBundledSection.bundleProductName}}"/>
<seeElement stepKey="LookingForPageNotFoundMessage2" selector="{{StorefrontBundledSection.pageNotFound}}"/>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain">
<argument name="productUrl" value="{{BundleProduct.urlKey}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement"/>
<actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct">
<argument name="productName" value="{{BundleProduct.name}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage"/>
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPageAgain2">
<argument name="productUrl" value="{{BundleProduct.urlKey2}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="WaitForProductPageToLoadToShowElement2"/>
<actionGroup ref="StorefrontAssertProductNameIsNotShownOnProductPageActionGroup" stepKey="LookingForNameOfProduct2">
<argument name="productName" value="{{BundleProduct.name2}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="LookingForPageNotFoundMessage2"/>
</test>
</tests>

0 comments on commit 1b81090

Please sign in to comment.