|
| 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="StorefrontOnlyXProductLeftForSimpleProductsTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <title value="See Only * Left block"/> |
| 15 | + <stories value="See Only * Left on product page if Only X left Threshold was set"/> |
| 16 | + <description value="See Only * Left on product page if Only X left Threshold was set"/> |
| 17 | + <testCaseId value="MC-35235"/> |
| 18 | + <severity value="MINOR"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 22 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 23 | + <requiredEntity createDataKey="createCategory"/> |
| 24 | + </createData> |
| 25 | + <magentoCLI command="config:set {{CatalogInventoryOptionsOnlyXleftThreshold.path}} 10000" stepKey="setStockThresholdQty"/> |
| 26 | + <magentoCLI command="cache:flush config" stepKey="flushCache"/> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 30 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 31 | + <magentoCLI command="config:set {{CatalogInventoryOptionsOnlyXleftThreshold.path}} {{CatalogInventoryOptionsOnlyXleftThreshold.value}}" stepKey="removedStockThresholdQty"/> |
| 32 | + </after> |
| 33 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 34 | + <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/> |
| 35 | + </actionGroup> |
| 36 | + <seeElement selector="{{StorefrontProductPageSection.onlyProductsLeft}}" stepKey="seeOnlyLeftBlock"/> |
| 37 | + </test> |
| 38 | +</tests> |
0 commit comments