|
| 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="StorefrontCustomerQuicklySearchesForProductByAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Search Term"/> |
| 14 | + <title value="Customer quickly searches for Product by Attribute"/> |
| 15 | + <description value="Customer quickly searches for Product by Attribute"/> |
| 16 | + <severity value="AVERAGE"/> |
| 17 | + <testCaseId value="AC-6157"/> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 21 | + |
| 22 | + <!--Create new searchable product attribute--> |
| 23 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> |
| 24 | + <actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createAttribute"> |
| 25 | + <argument name="attribute" value="textProductAttribute"/> |
| 26 | + </actionGroup> |
| 27 | + <!--Assign attribute to the Default set--> |
| 28 | + <actionGroup ref="AdminOpenAttributeSetGridPageActionGroup" stepKey="openAttributeSetPage"/> |
| 29 | + <actionGroup ref="AdminOpenAttributeSetByNameActionGroup" stepKey="openDefaultAttributeSet"/> |
| 30 | + <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignAttributeToGroup"> |
| 31 | + <argument name="group" value="Product Details"/> |
| 32 | + <argument name="attribute" value="{{textProductAttribute.attribute_code}}"/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/> |
| 35 | + <!--Create product and fill new attribute field--> |
| 36 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/> |
| 37 | + <waitForPageLoad stepKey="waitForProductIndexPage"/> |
| 38 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct"> |
| 39 | + <argument name="product" value="SimpleProduct"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductForm"> |
| 42 | + <argument name="product" value="SimpleProduct"/> |
| 43 | + </actionGroup> |
| 44 | + <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/> |
| 45 | + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton"/> |
| 46 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 47 | + <argument name="indices" value=""/> |
| 48 | + </actionGroup> |
| 49 | + <comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/> |
| 50 | + </before> |
| 51 | + |
| 52 | + <after> |
| 53 | + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid"> |
| 54 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 55 | + </actionGroup> |
| 56 | + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode"> |
| 57 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 58 | + </actionGroup> |
| 59 | + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="deleteProductAttributeSuccess"/> |
| 60 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> |
| 61 | + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> |
| 62 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 63 | + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/> |
| 64 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> |
| 65 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex"> |
| 66 | + <argument name="indices" value=""/> |
| 67 | + </actionGroup> |
| 68 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 69 | + </after> |
| 70 | + |
| 71 | + <!--Assert search results on storefront--> |
| 72 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> |
| 73 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm"> |
| 74 | + <argument name="phrase" value="searchable"/> |
| 75 | + </actionGroup> |
| 76 | + <see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/> |
| 77 | + |
| 78 | + |
| 79 | + </test> |
| 80 | +</tests> |
0 commit comments