|
| 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="AdminProductCanBeFoundByAttributeValueTest"> |
| 12 | + <annotations> |
| 13 | + <features value="CatalogSearch"/> |
| 14 | + <stories value="Create simple product with attribute"/> |
| 15 | + <title value="Product can be found by value of 'Searchable' attribute by admin"/> |
| 16 | + <description value="Verifying that product can be found using value of 'searchable' attribute in QuickSearch by admin"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-5226"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Login as admin --> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + <!--Create new searchable product attribute--> |
| 24 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="goToProductAttributes"/> |
| 25 | + <actionGroup ref="AdminCreateSearchableProductAttributeActionGroup" stepKey="createSearchableAttribute"> |
| 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 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductGridPage"/> |
| 38 | + <actionGroup ref="GoToCreateProductPageActionGroup" stepKey="createSimpleProduct"> |
| 39 | + <argument name="product" value="SimpleProduct"/> |
| 40 | + </actionGroup> |
| 41 | + <actionGroup ref="FillMainProductFormNoWeightActionGroup" stepKey="fillProductDetailsForm"> |
| 42 | + <argument name="product" value="SimpleProduct"/> |
| 43 | + </actionGroup> |
| 44 | + <waitForElementVisible selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" stepKey="waitForAttributeElementToBeVisible"/> |
| 45 | + <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/> |
| 46 | + <actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveAttributeButton"/> |
| 47 | + </before> |
| 48 | + <after> |
| 49 | + <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="openProductAttributeFromSearchResultInGrid"> |
| 50 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 51 | + </actionGroup> |
| 52 | + <actionGroup ref="DeleteProductAttributeByAttributeCodeActionGroup" stepKey="deleteProductAttributeByAttributeCode"> |
| 53 | + <argument name="productAttributeCode" value="{{textProductAttribute.attribute_code}}"/> |
| 54 | + </actionGroup> |
| 55 | + <actionGroup ref="AssertProductAttributeRemovedSuccessfullyActionGroup" stepKey="assertProductAttributeDeletionSuccess"/> |
| 56 | + <actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttributeGrid"/> |
| 57 | + <waitForElementClickable selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="waitForResetButtonToAppear"/> |
| 58 | + <click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid"/> |
| 59 | + <actionGroup ref="AdminProductCatalogPageOpenActionGroup" stepKey="goToProductCatalog"/> |
| 60 | + <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteCreatedSimpleProduct"/> |
| 61 | + <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/> |
| 62 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/> |
| 63 | + </after> |
| 64 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/> |
| 65 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm"> |
| 66 | + <argument name="phrase" value="searchable"/> |
| 67 | + </actionGroup> |
| 68 | + <waitForText selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductName"/> |
| 69 | + </test> |
| 70 | +</tests> |
0 commit comments