Skip to content

Commit dd0b7bb

Browse files
committed
ACQE-3996:Customer when he tries to input the same search term in quick search on Storefront
1 parent eb1e3a0 commit dd0b7bb

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AutoCompleteSearchTermsAndPhrasesWhileUserIsTypingTest">
11+
<annotations>
12+
<stories value="Search Terms"/>
13+
<title value="In this test-case we need to verify that previously used earlier search terms are auto-complete"/>
14+
<description value=" search terms are auto-complete for Customer when he tries to input the same search term in quick search on Storefront"/>
15+
<severity value="CRITICAL"/>
16+
<testCaseId value="AC-5003"/>
17+
<group value="mtf_migrated"/>
18+
</annotations>
19+
20+
<before>
21+
<!-- Login as admin -->
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
24+
<!--Create Simple Product -->
25+
<createData entity="defaultSimpleProduct" stepKey="simpleProduct"/>
26+
27+
<magentoCron groups="index" stepKey="reindex"/>
28+
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
29+
</before>
30+
<after>
31+
<!-- Delete create product -->
32+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
33+
34+
<!-- Go to the catalog search term page -->
35+
<actionGroup ref="AdminOpenCatalogSearchTermIndexPageActionGroup" stepKey="openAdminCatalogSearchTermIndexPage"/>
36+
37+
<!--Filter the search term -->
38+
<actionGroup ref="AdminSearchTermFilterBySearchQueryActionGroup" stepKey="filterByThirdSearchQuery">
39+
<argument name="searchQuery" value="$$simpleProduct.name$$"/>
40+
</actionGroup>
41+
<!--Filter the search term -->
42+
<actionGroup ref="AdminSearchTermFilterBySearchQueryActionGroup" stepKey="filterByThirdSearchQuerySku">
43+
<argument name="searchQuery" value="$$simpleProduct.sku$$"/>
44+
</actionGroup>
45+
<!-- Delete created below search terms -->
46+
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
48+
</after>
49+
50+
<!-- Go to storefront home page -->
51+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
52+
53+
<!--Storefront quick search by product name -->
54+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName">
55+
<argument name="phrase" value="$$simpleProduct.name$$"/>
56+
</actionGroup>
57+
58+
<!--Verify search suggestions and select the suggestion from dropdown options -->
59+
<actionGroup ref="StoreFrontSelectDropDownSearchSuggestionActionGroup" stepKey="seeDropDownSearchSuggestion">
60+
<argument name="searchQuery" value="$$simpleProduct.name$$"/>
61+
</actionGroup>
62+
63+
<!-- Assert Product storefront main page -->
64+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductName">
65+
<argument name="productName" value="$$simpleProduct.name$$"/>
66+
</actionGroup>
67+
<!--Storefront quick search by product name -->
68+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductNameSku">
69+
<argument name="phrase" value="$$simpleProduct.sku$$"/>
70+
</actionGroup>
71+
72+
<!--Verify search suggestions and select the suggestion from dropdown options -->
73+
<actionGroup ref="StoreFrontSelectDropDownSearchSuggestionActionGroup" stepKey="seeDropDownSearchSuggestionSku">
74+
<argument name="searchQuery" value="$$simpleProduct.sku$$"/>
75+
</actionGroup>
76+
<!-- Assert Product storefront main page -->
77+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameSku">
78+
<argument name="productName" value="$$simpleProduct.name$$"/>
79+
</actionGroup>
80+
</test>
81+
</tests>

0 commit comments

Comments
 (0)