Skip to content

Commit 317d575

Browse files
committed
AC-4953:Admin should search special character Using elastic search test
1 parent c7464fe commit 317d575

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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="AdminVerifySearchLongPhraseWithSomeWordsInQuotesWorksWithoutErrorsTest">
12+
<annotations>
13+
<features value="CatalogSearch"/>
14+
<stories value="Create Simple product with special character"/>
15+
<title value="Admin should search special character Using elastic search"/>
16+
<description value="Admin should search special character Using elastic search test"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-4953"/>
19+
<group value="searchFrontend"/>
20+
</annotations>
21+
<before>
22+
<!-- Login as admin -->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
</before>
25+
<after>
26+
<!--Delete product1-->
27+
<deleteData createDataKey="product1" stepKey="deleteProduct1"/>
28+
<!--Logout from admin-->
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
30+
</after>
31+
<!-- Create simple product with special characters-->
32+
<createData entity="SimpleTwo" stepKey="product1">
33+
<field key="sku">ZXH@/#-QJ185</field>
34+
</createData>
35+
<!-- Go to synonyms page and create new synonyms -->
36+
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToSearchSynonymsPage">
37+
<argument name="menuUiId" value="{{AdminMenuMarketing.dataUiId}}"/>
38+
<argument name="submenuUiId" value="{{AdminSearchSynonyms.dataUiId}}"/>
39+
</actionGroup>
40+
<!-- Create 1st synonym -->
41+
<actionGroup ref="AdminNavigateToNewSearchSynonymsPageActionGroup" stepKey="navigateToNewSearchSynonymsOne"/>
42+
<actionGroup ref="AdminFillNewSearchSynonymsActionGroup" stepKey="fillFirstSearchSynonym">
43+
<argument name="scope_id" value="1:0"/>
44+
<argument name="synonyms" value="allviews,simple"/>
45+
</actionGroup>
46+
<click selector="{{AdminSearchSynonymsNewSection.save}}" stepKey="clickSaveSynonymOneButton"/>
47+
<waitForPageLoad stepKey="waitPageLoadAfterFirstSynonym"/>
48+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
49+
<argument name="tags" value="config full_page"/>
50+
</actionGroup>
51+
<!--Navigate to home page-->
52+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
53+
<!--Search for word "ZXH-QJ185"-->
54+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="search">
55+
<argument name="phrase" value="ZXH@/#-QJ185"/>
56+
</actionGroup>
57+
<!--Assert that product1 is first in the search result-->
58+
<actionGroup ref="StorefrontQuickSearchCheckProductNameInGridActionGroup" stepKey="assertProduct1Position">
59+
<argument name="productName" value="$product1.name$"/>
60+
<argument name="index" value="1"/>
61+
</actionGroup>
62+
</test>
63+
</tests>

0 commit comments

Comments
 (0)