Skip to content

Commit 87a5fa0

Browse files
committed
MC-6421: Admin search displays settings and content items
1 parent 3acf193 commit 87a5fa0

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminGlobalSearchSection">
12+
<element name="globalSearch" type="button" selector="//label[contains(concat(' ',normalize-space(@class),' '),' search-global-label ')]"/>
13+
<element name="globalSearchActive" type="block" selector="//div[contains(concat(' ',normalize-space(@class),' '),' search-global-field _active ')]"/>
14+
</section>
15+
</sections>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<!-- Login as admin -->
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
</before>
26+
<after>
27+
<!-- Delete product -->
28+
<actionGroup ref="deleteProductBySku" stepKey="deleteProduct">
29+
<argument name="sku" value="{{SimpleProduct.sku}}"/>
30+
</actionGroup>
31+
32+
<!-- Delete category -->
33+
<actionGroup ref="DeleteCategory" stepKey="deleteCreatedNewRootCategory">
34+
<argument name="categoryEntity" value="_defaultCategory"/>
35+
</actionGroup>
36+
37+
<!-- Logout -->
38+
<actionGroup ref="logout" stepKey="logout"/>
39+
</after>
40+
41+
<!-- Create Simple Product -->
42+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/>
43+
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
44+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
45+
<argument name="product" value="SimpleProduct"/>
46+
</actionGroup>
47+
<actionGroup ref="fillMainProductForm" stepKey="fillProductForm">
48+
<argument name="product" value="SimpleProduct"/>
49+
</actionGroup>
50+
51+
<!-- Create new category for product -->
52+
<actionGroup ref="FillNewProductCategory" stepKey="FillNewProductCategory">
53+
<argument name="categoryName" value="{{_defaultCategory.name}}"/>
54+
</actionGroup>
55+
56+
<!-- Save product form -->
57+
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
58+
59+
<!-- Click on the magnifying glass to start searching -->
60+
<click selector="{{AdminGlobalSearchSection.globalSearch}}" stepKey="clickSearchBtn"/>
61+
62+
<!-- The search input is expanded and active -->
63+
<seeElement selector="{{AdminGlobalSearchSection.globalSearchActive}}" stepKey="seeActiveSearch"/>
64+
</test>
65+
</tests>

0 commit comments

Comments
 (0)