![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-bundle/Test/Mftf/Test/ |
<?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="AdminEditRelatedBundleProductTest"> <annotations> <features value="Bundle"/> <stories value="Create/Edit bundle product in Admin"/> <title value="Admin should be able to set/edit Related Products information when editing a bundle product"/> <description value="Admin should be able to set/edit Related Products information when editing a bundle product"/> <severity value="CRITICAL"/> <testCaseId value="MC-3342"/> <group value="Bundle"/> </annotations> <before> <!--Admin login--> <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> <createData entity="SimpleProduct2" stepKey="simpleProduct0"/> <createData entity="SimpleProduct2" stepKey="simpleProduct1"/> <magentoCron stepKey="runCronIndex" groups="index"/> </before> <after> <!-- Delete the bundled product --> <actionGroup stepKey="deleteBundle" ref="DeleteProductUsingProductGridActionGroup"> <argument name="product" value="BundleProduct"/> </actionGroup> <actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="clearFilters"/> <!--Logging out--> <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> <deleteData createDataKey="simpleProduct0" stepKey="deleteSimpleProduct0"/> <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> </after> <!-- Create a bundle product --> <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/> <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct"> <argument name="product" value="BundleProduct"/> </actionGroup> <actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillBundleProductNameAndSku"> <argument name="product" value="BundleProduct"/> </actionGroup> <actionGroup ref="AddRelatedProductBySkuActionGroup" stepKey="addRelatedProduct0"> <argument name="sku" value="$$simpleProduct0.sku$$"/> </actionGroup> <!--Save the product--> <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> <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$$"/> </actionGroup> <!--Remove previous related product--> <click selector="{{AdminProductFormRelatedUpSellCrossSellSection.removeRelatedProduct($$simpleProduct0.sku$$)}}" stepKey="removeRelatedProduct"/> <!--Save the product--> <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonAfterEdit"/> <actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShownAgain"> <argument name="message" value="You saved the product."/> </actionGroup> <!--See related product in admin--> <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--> <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>