|
| 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="EnablingManageStockTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Enabling Manage Stock During Product Creation"/> |
| 15 | + <title value="Enabling Manage Stock During Product Creation"/> |
| 16 | + <description value="Admin can EnableManage Stock During Product Creation"/> |
| 17 | + <severity value="AVERAGE"/> |
| 18 | + <testCaseId value="MC-27457"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Set ManageStock to No--> |
| 22 | + <magentoCLI command="config:set {{CatalogInventoryManageStockDisable.path}} {{CatalogInventoryManageStockDisable.value}}" stepKey="manageStockdisable"/> |
| 23 | + <!-- Login to Admin Panel --> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!--Logout From Admin Panel --> |
| 28 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> |
| 29 | + </after> |
| 30 | + <!-- Navigate to Product Page--> |
| 31 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/> |
| 32 | + <!-- Click on Add Product Button --> |
| 33 | + <click selector="#add_new_product-button" stepKey="clickAddProductButton"/> |
| 34 | + <!-- Wait for Page Load--> |
| 35 | + <waitForPageLoad stepKey="waitForNewProductPageOpened"/> |
| 36 | + <!-- Fill Product Name--> |
| 37 | + <fillField selector="{{AdminProductFormSection.productName}}" userInput="Sample Product" stepKey="fillProductName" /> |
| 38 | + <!-- Fill Product Price--> |
| 39 | + <fillField selector="{{AdminProductFormSection.productPrice}}" userInput="100" stepKey="fillProductPrice" /> |
| 40 | + <!-- Click on Advanced Inventory Section--> |
| 41 | + <click selector="{{AdminProductFormSection.advancedInventoryLink}}" stepKey="goToAdvancedInventory"/> |
| 42 | + <!-- Uncheck Manage Stock Use Config Settings--> |
| 43 | + <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.useConfigSettings}}" stepKey="uncheckQManangeStockConfigCheckbox"/> |
| 44 | + <!-- Set Manage Stock to Yes--> |
| 45 | + <selectOption selector="{{AdminProductFormAdvancedInventorySection.manageStock}}" userInput="Yes" stepKey="changeManageStocktoYes"/> |
| 46 | + <!-- Add Quantity field--> |
| 47 | + <fillField selector="{{AdminProductFormAdvancedInventorySection.advancedInventoryQty}}" userInput="10" stepKey="fillAdvancedInventoryQuantity" /> |
| 48 | + <!-- Uncheck Threshold Use Config Settings--> |
| 49 | + <uncheckOption selector="{{AdminProductFormAdvancedInventorySection.minQtyConfigSetting}}" stepKey="uncheckThhresholdConfigCheckbox"/> |
| 50 | + <!--Fill Threshold Value--> |
| 51 | + <fillField selector="{{AdminProductFormAdvancedInventorySection.outOfStockThreshold}}" userInput="10" stepKey="fillAdvancedInventoryThresholdValue" /> |
| 52 | + <!-- Save Advanced Inventory Section--> |
| 53 | + <actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/> |
| 54 | + <!-- Save Product Page--> |
| 55 | + <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProductAfterDisableManageStock"/> |
| 56 | + </test> |
| 57 | +</tests> |
0 commit comments