|
| 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="StoreFrontSearchWithProductAttributeOptionValue"> |
| 12 | + <annotations> |
| 13 | + <stories value="Store front search product when display out of stock products to yes"/> |
| 14 | + <title value="Catalog shown entire catalog items count if show_of_stock_option enabled"/> |
| 15 | + <description value="Catalog shown entire catalog items count if show_of_stock_option enabled"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="AC-6395"/> |
| 18 | + <group value="catalog_search"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <magentoCLI command="config:set cataloginventory/options/show_out_of_stock 1" stepKey="setOutOfStockToYes"/> |
| 22 | + <magentoCLI command="cache:clean config" stepKey="cacheClean"/> |
| 23 | + <actionGroup ref="AdminLoginActionGroup" stepKey="login"/> |
| 24 | + |
| 25 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 26 | + <createData entity="SimpleProduct" stepKey="createProduct01"> |
| 27 | + <requiredEntity createDataKey="createCategory"/> |
| 28 | + </createData> |
| 29 | + |
| 30 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 31 | + <createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption1"> |
| 32 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 33 | + </createData> |
| 34 | + <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOption2"> |
| 35 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 36 | + </createData> |
| 37 | + <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> |
| 38 | + <requiredEntity createDataKey="createConfigProductAttribute"/> |
| 39 | + </createData> |
| 40 | + |
| 41 | + <createData entity="SimpleProduct" stepKey="createProduct02"> |
| 42 | + <requiredEntity createDataKey="createCategory"/> |
| 43 | + </createData> |
| 44 | + |
| 45 | + <createData entity="AssignProductToCategory" stepKey="assignTestCategoryToTestProduct"> |
| 46 | + <requiredEntity createDataKey="createCategory"/> |
| 47 | + <requiredEntity createDataKey="createProduct01"/> |
| 48 | + <requiredEntity createDataKey="createProduct02"/> |
| 49 | + </createData> |
| 50 | + </before> |
| 51 | + <after> |
| 52 | + <magentoCLI command="config:set cataloginventory/options/show_out_of_stock 0" stepKey="setOutOfStockToNo"/> |
| 53 | + <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> |
| 54 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 55 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 56 | + <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/> |
| 57 | + <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/> |
| 58 | + </after> |
| 59 | + |
| 60 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.custom_attributes[url_key]$$)}}" stepKey="goToStorefrontCreatedCategoryPage"/> |
| 61 | + <click selector="{{StorefrontCategoryMainSection.productAttributeName('attribute')}}" stepKey="selectProductAttribute"/> |
| 62 | + <wait time="2" stepKey="waitForLoad"/> |
| 63 | + <click selector="{{StorefrontCategoryMainSection.productAttributeOptionValue('option')}}" stepKey="selectProductAttributeOptionValue"/> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments