|
| 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="ElasticsearchProductCanBeFoundByValueOfSearchableAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Elastic Search"/> |
| 14 | + <title value="Product can be found by value of 'Searchable' attribute"/> |
| 15 | + <description value="Product can be found by value of 'Searchable' attribute"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4086"/> |
| 18 | + </annotations> |
| 19 | + |
| 20 | + <before> |
| 21 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 22 | + <actionGroup ref="ChooseElasticSearchAsSearchEngineActionGroup" stepKey="chooseElasticSearch"/> |
| 23 | + <!--Create new searchable product attribute--> |
| 24 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> |
| 25 | + <actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createAttribute"> |
| 26 | + <argument name="attribute" value="textProductAttribute"/> |
| 27 | + </actionGroup> |
| 28 | + <!--Assign attribute to the Default set--> |
| 29 | + <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> |
| 30 | + <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/> |
| 31 | + <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup"> |
| 32 | + <argument name="group" value="Product Details"/> |
| 33 | + <argument name="attribute" value="{{textProductAttribute.attribute_code}}"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> |
| 36 | + <!--Create product and fill new attribute field--> |
| 37 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 38 | + <waitForPageLoad stepKey="waitForProductIndexPage"/> |
| 39 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> |
| 40 | + <argument name="product" value="SimpleProduct"/> |
| 41 | + </actionGroup> |
| 42 | + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm"> |
| 43 | + <argument name="product" value="SimpleProduct"/> |
| 44 | + </actionGroup> |
| 45 | + <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/> |
| 46 | + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> |
| 47 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 48 | + <argument name="indices" value=""/> |
| 49 | + </actionGroup> |
| 50 | + </before> |
| 51 | + <after> |
| 52 | + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid"> |
| 53 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode"> |
| 56 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/> |
| 59 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> |
| 60 | + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> |
| 61 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 62 | + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/> |
| 63 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> |
| 64 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 65 | + <argument name="indices" value=""/> |
| 66 | + </actionGroup> |
| 67 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 68 | + </after> |
| 69 | + |
| 70 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> |
| 71 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm"> |
| 72 | + <argument name="phrase" value="searchable"/> |
| 73 | + </actionGroup> |
| 74 | + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/> |
| 75 | + <!--<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes1"/>--> |
| 76 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> |
| 77 | + <fillField selector="{{AdminProductAttributeGridSection.FilterByAttributeCode}}" userInput="{{textProductAttribute.attribute_code}}" stepKey="fillAttrCodeField" /> |
| 78 | + <click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="clickSearchBtn" /> |
| 79 | + <click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="chooseFirstRow" /> |
| 80 | + <click selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}" stepKey="goToStorefrontPropertiesTab"/> |
| 81 | + <waitForElementVisible selector="{{StorefrontPropertiesSection.PageTitle}}" stepKey="waitTabLoad"/> |
| 82 | + <selectOption selector="{{AdvancedAttributePropertiesSection.UseInSearch}}" userInput="No" stepKey="setSearchable"/> |
| 83 | + <click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/> |
| 84 | + <!--<actionGroup ref="AdminCreateNonSearchableProductAttributeActionGroup" stepKey="createAttribute1"> |
| 85 | + <argument name="attribute" value="textProductAttribute"/> |
| 86 | + </actionGroup>--> |
| 87 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 88 | + <argument name="indices" value=""/> |
| 89 | + </actionGroup> |
| 90 | + <!--<magentoCLI stepKey="flushCache" command="cache:flush"/>--> |
| 91 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage1"/> |
| 92 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm1"> |
| 93 | + <argument name="phrase" value="searchable"/> |
| 94 | + </actionGroup> |
| 95 | + <dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="dontSeeProductName1"/> |
| 96 | + </test> |
| 97 | +</tests> |
0 commit comments