|
| 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="AdminCategorySearchTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Search Category"/> |
| 14 | + <stories value="Search categories in admin panel"/> |
| 15 | + <title value="Search for categories"/> |
| 16 | + <description value="Global search in backend can search into Categories."/> |
| 17 | + <severity value="MINOR"/> |
| 18 | + <group value="Search"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Login as admin --> |
| 22 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 23 | + |
| 24 | + <!-- Create Simple Category --> |
| 25 | + <createData entity="SimpleSubCategory" stepKey="createSimpleCategory"/> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <!-- Delete created category --> |
| 29 | + <deleteData createDataKey="createSimpleCategory" stepKey="deleteCreatedCategory"/> |
| 30 | + |
| 31 | + <!-- Log out --> |
| 32 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 33 | + </after> |
| 34 | + <!-- Add created category name in the search field--> |
| 35 | + <actionGroup ref="AdminSetGlobalSearchValueActionGroup" stepKey="setSearch"> |
| 36 | + <argument name="textSearch" value="$$createSimpleCategory.name$$"/> |
| 37 | + </actionGroup> |
| 38 | + |
| 39 | + <!-- Wait for suggested results--> |
| 40 | + <waitForElementVisible selector="{{AdminGlobalSearchSection.globalSearchSuggestedCategoryText}}" stepKey="waitForSuggestions"/> |
| 41 | + |
| 42 | + <!-- Click on suggested result in category URL--> |
| 43 | + <click selector="{{AdminGlobalSearchSection.globalSearchSuggestedCategoryLink}}" stepKey="openCategory"/> |
| 44 | + |
| 45 | + <!-- Wait for suggested results--> |
| 46 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 47 | + |
| 48 | + <!-- Loaded page should be edit page of created category --> |
| 49 | + <seeInField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="$$createSimpleCategory.name$$" stepKey="checkCategoryName"/> |
| 50 | + </test> |
| 51 | +</tests> |
0 commit comments