|
| 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="AdminGlobalSearchOnProductPageTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Search"/> |
| 14 | + <stories value="Backend global search"/> |
| 15 | + <title value="Admin global search on product page test"/> |
| 16 | + <description value="Admin search displays settings and content items"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-6421"/> |
| 19 | + <group value="Search"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!-- Login as admin --> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <!-- Delete product --> |
| 27 | + <actionGroup ref="deleteProductBySku" stepKey="deleteProduct"> |
| 28 | + <argument name="sku" value="{{SimpleProduct.sku}}"/> |
| 29 | + </actionGroup> |
| 30 | + |
| 31 | + <!-- Delete category --> |
| 32 | + <actionGroup ref="DeleteCategory" stepKey="deleteCreatedNewRootCategory"> |
| 33 | + <argument name="categoryEntity" value="_defaultCategory"/> |
| 34 | + </actionGroup> |
| 35 | + |
| 36 | + <!-- Logout --> |
| 37 | + <actionGroup ref="logout" stepKey="logout"/> |
| 38 | + </after> |
| 39 | + |
| 40 | + <!-- Create Simple Product --> |
| 41 | + <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/> |
| 42 | + <waitForPageLoad stepKey="waitForProductIndexPageLoad"/> |
| 43 | + <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage"> |
| 44 | + <argument name="product" value="SimpleProduct"/> |
| 45 | + </actionGroup> |
| 46 | + <actionGroup ref="fillMainProductForm" stepKey="fillProductForm"> |
| 47 | + <argument name="product" value="SimpleProduct"/> |
| 48 | + </actionGroup> |
| 49 | + |
| 50 | + <!-- Create new category for product --> |
| 51 | + <actionGroup ref="FillNewProductCategory" stepKey="FillNewProductCategory"> |
| 52 | + <argument name="categoryName" value="{{_defaultCategory.name}}"/> |
| 53 | + </actionGroup> |
| 54 | + |
| 55 | + <!-- Save product form --> |
| 56 | + <actionGroup ref="saveProductForm" stepKey="saveProductForm"/> |
| 57 | + |
| 58 | + <!-- Click on the magnifying glass to start searching --> |
| 59 | + <click selector="{{AdminGlobalSearchSection.globalSearch}}" stepKey="clickSearchBtn"/> |
| 60 | + <waitForElementVisible selector="{{AdminGlobalSearchSection.globalSearchActive}}" stepKey="waitForSearchInputVisible"/> |
| 61 | + |
| 62 | + <!-- The search input is expanded and active --> |
| 63 | + <seeElement selector="{{AdminGlobalSearchSection.globalSearchActive}}" stepKey="seeActiveSearch"/> |
| 64 | + </test> |
| 65 | +</tests> |
0 commit comments