|
| 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="StorefrontUsingElasticSearchWithWeightAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="CatalogSearch"/> |
| 14 | + <stories value="Storefront Search"/> |
| 15 | + <title value="Using ElasticSearch with weight attribute"/> |
| 16 | + <description value="Use ElasticSearch for products with weight attributes"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-31368"/> |
| 19 | + <group value="SearchEngineElasticsearch"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!--Create Simple Product with weight--> |
| 23 | + <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/> |
| 24 | + <!-- Login as admin --> |
| 25 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <!-- Delete create product --> |
| 29 | + <deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/> |
| 30 | + <!-- Change attribute property: Use in Search >No --> |
| 31 | + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openWeightProductAttributeInAdmin"> |
| 32 | + <argument name="productAttributeCode" value="weight"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="AdminSetUseInSearchValueForProductAttributeActionGroup" stepKey="makeAttributeUnsearchableInAQuickSearch"> |
| 35 | + <argument name="useInSearchValue" value="No"/> |
| 36 | + </actionGroup> |
| 37 | + <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttributeChanges"/> |
| 38 | + <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/> |
| 39 | + <!-- Logout from admin --> |
| 40 | + <actionGroup ref="logout" stepKey="logoutFromAdmin"/> |
| 41 | + </after> |
| 42 | + <!-- Step 2 --> |
| 43 | + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openWeightProductAttribute"> |
| 44 | + <argument name="productAttributeCode" value="weight"/> |
| 45 | + </actionGroup> |
| 46 | + <!-- Change attribute property: Use in Search >Yes --> |
| 47 | + <actionGroup ref="AdminSetUseInSearchValueForProductAttributeActionGroup" stepKey="makeAttributeSearchableInAQuickSearch"/> |
| 48 | + <actionGroup ref="SaveProductAttributeActionGroup" stepKey="saveAttribute"/> |
| 49 | + <!-- Step 3 --> |
| 50 | + <actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="reindexInvalidatedIndices"/> |
| 51 | + <!-- Step 4 --> |
| 52 | + <magentoCLI command="cache:clean" arguments="full_page" stepKey="clearFPC"/> |
| 53 | + <!-- Step 5 --> |
| 54 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/> |
| 55 | + <!-- Step 6 --> |
| 56 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByAnyValue"> |
| 57 | + <argument name="phrase" value="exampleTestValue2020"/> |
| 58 | + </actionGroup> |
| 59 | + <see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductMessage"/> |
| 60 | + </test> |
| 61 | +</tests> |
0 commit comments