|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminMassUpdateProductQtyIncrementsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Mass update advanced inventory attributes"/> |
| 15 | + <title value="Admin should be able to mass update product qty increments"/> |
| 16 | + <description value="Admin should be able to mass update product qty increments"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="MC-39359"/> |
| 19 | + <useCaseId value="MC-36787"/> |
| 20 | + <group value="catalog"/> |
| 21 | + <group value="CatalogInventory"/> |
| 22 | + <group value="product_attributes"/> |
| 23 | + </annotations> |
| 24 | + <before> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 26 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 27 | + <createData entity="ApiSimpleProduct" stepKey="createProductOne"> |
| 28 | + <requiredEntity createDataKey="createCategory"/> |
| 29 | + </createData> |
| 30 | + <createData entity="ApiSimpleProduct" stepKey="createProductTwo"> |
| 31 | + <requiredEntity createDataKey="createCategory"/> |
| 32 | + </createData> |
| 33 | + </before> |
| 34 | + <after> |
| 35 | + <deleteData createDataKey="createProductOne" stepKey="deleteProductOne"/> |
| 36 | + <deleteData createDataKey="createProductTwo" stepKey="deleteProductTwo"/> |
| 37 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 38 | + <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/> |
| 39 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/> |
| 40 | + </after> |
| 41 | + <!-- Navigate to products list page and select created products --> |
| 42 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
| 43 | + <actionGroup ref="SearchProductGridByKeyword2ActionGroup" stepKey="searchByKeyword"> |
| 44 | + <argument name="keyword" value="api-simple-product"/> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/> |
| 47 | + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/> |
| 48 | + <click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/> |
| 49 | + <!-- Mass update qty increments --> |
| 50 | + <actionGroup ref="AdminClickMassUpdateProductAttributesActionGroup" stepKey="clickMassUpdateProductAttributes"/> |
| 51 | + <actionGroup ref="AdminMassUpdateProductQtyIncrementsActionGroup" stepKey="updateQtyIncrements"> |
| 52 | + <argument name="enableQtyIncrements" value="Yes"/> |
| 53 | + <argument name="qtyIncrements" value="2"/> |
| 54 | + </actionGroup> |
| 55 | + <!-- Start message queue for product attribute consumer --> |
| 56 | + <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"> |
| 57 | + <argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/> |
| 58 | + <argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/> |
| 59 | + </actionGroup> |
| 60 | + <!-- Open first product for edit and assert that qty increment is updated --> |
| 61 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage"> |
| 62 | + <argument name="productId" value="$createProductOne.id$"/> |
| 63 | + </actionGroup> |
| 64 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 65 | + <actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/> |
| 66 | + <seeOptionIsSelected selector="{{AdminProductFormAdvancedInventorySection.enableQtyIncrements}}" userInput="Yes" stepKey="assertEnableQtyIncrementsValue"/> |
| 67 | + <dontSeeCheckboxIsChecked selector="{{AdminProductFormAdvancedInventorySection.enableQtyIncrementsUseConfigSettings}}" stepKey="assertEnableQtyIncrementsUseConfigSettings"/> |
| 68 | + <seeInField selector="{{AdminProductFormAdvancedInventorySection.qtyIncrements}}" userInput="2" stepKey="assertQtyIncrementsValue"/> |
| 69 | + <dontSeeCheckboxIsChecked selector="{{AdminProductFormAdvancedInventorySection.qtyIncrementsUseConfigSettings}}" stepKey="assertQtyIncrementsUseConfigSettings"/> |
| 70 | + <!-- Open second product for edit and assert that qty increment is updated --> |
| 71 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage2"> |
| 72 | + <argument name="productId" value="$createProductTwo.id$"/> |
| 73 | + </actionGroup> |
| 74 | + <waitForPageLoad stepKey="waitForProductPageLoad2"/> |
| 75 | + <actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink2"/> |
| 76 | + <seeOptionIsSelected selector="{{AdminProductFormAdvancedInventorySection.enableQtyIncrements}}" userInput="Yes" stepKey="assertEnableQtyIncrementsValue2"/> |
| 77 | + <dontSeeCheckboxIsChecked selector="{{AdminProductFormAdvancedInventorySection.enableQtyIncrementsUseConfigSettings}}" stepKey="assertEnableQtyIncrementsUseConfigSettings2"/> |
| 78 | + <seeInField selector="{{AdminProductFormAdvancedInventorySection.qtyIncrements}}" userInput="2" stepKey="assertQtyIncrementsValue2"/> |
| 79 | + <dontSeeCheckboxIsChecked selector="{{AdminProductFormAdvancedInventorySection.qtyIncrementsUseConfigSettings}}" stepKey="assertQtyIncrementsUseConfigSettings2"/> |
| 80 | + </test> |
| 81 | +</tests> |
0 commit comments