|
| 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="AdminProductsLowStockReportsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Reports"/> |
| 14 | + <stories value="Products low stock report"/> |
| 15 | + <title value="Admin products low stock report test"/> |
| 16 | + <description value="Admin products should be displayed correctly in Low Stock report"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-11747"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!--Login as admin--> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 23 | + <!--Create product with quantity as 1--> |
| 24 | + <createData entity="SimpleProductWithQty1" stepKey="createProductWithQty1"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!--Delete product--> |
| 28 | + <deleteData createDataKey="createProductWithQty1" stepKey="deleteProduct"/> |
| 29 | + <!--Logout as admin--> |
| 30 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsAdmin"/> |
| 31 | + </after> |
| 32 | + <!--Set Notify for Quantity Below is 2--> |
| 33 | + <magentoCLI command="config:set cataloginventory/item_options/notify_stock_qty 2" stepKey="setNotifyForQuantityBelowTwo"/> |
| 34 | + <!--Clear invalidated cache--> |
| 35 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache"> |
| 36 | + <argument name="tags" value="config full_page"/> |
| 37 | + </actionGroup> |
| 38 | + <!--Navigate to Report > Low Stock--> |
| 39 | + <amOnPage url="{{LowStockReportPage.url}}" stepKey="navigateToLowStockReportPage"/> |
| 40 | + <!--Filter product having quantity 1--> |
| 41 | + <actionGroup ref="AdminSearchLowStockReportByProductSkuAndSourceCodeActionGroup" stepKey="filterProductHavingQty1"> |
| 42 | + <argument name="productSku" value="$$createProductWithQty1.sku$$"/> |
| 43 | + <argument name="sourceCode" value="{{_defaultSource.source_code}}"/> |
| 44 | + </actionGroup> |
| 45 | + <!--Assert product, sku and quantity having quantity as 1--> |
| 46 | + <actionGroup ref="AdminVerifyLowStockProductReportActionGroup" stepKey="verifyProductReport"> |
| 47 | + <argument name="product" value="$$createProductWithQty1$$"/> |
| 48 | + <argument name="productQty" value="$$createProductWithQty1.quantity$$"/> |
| 49 | + </actionGroup> |
| 50 | + </test> |
| 51 | +</tests> |
0 commit comments