Skip to content

Commit 94987c0

Browse files
committed
MC-40376: Auto suggestion box not reappearing after clicking outside the text field
1 parent 52e04e6 commit 94987c0

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StoreFrontAssertDropDownSearchSuggestionActionGroup">
12+
<annotations>
13+
<description>Fills the Storefront Quick Search field. Validates that the Search Suggestion is present</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="searchQuery" type="string"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" stepKey="waitForQuickSearchToBeVisible"/>
20+
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{searchQuery}}" stepKey="fillSearchInput"/>
21+
<waitForElementVisible selector="{{StorefrontQuickSearchSection.searchDropDownSuggestion}}" stepKey="WaitForSearchDropDownSuggestion"/>
22+
<see selector="{{StorefrontQuickSearchSection.searchDropDownSuggestion}}" stepKey="seeDropDownSuggestion"/>
23+
<click selector="//div[@class='panel wrapper']" stepKey="clickOnSomewhere"/>
24+
<dontSee selector="{{StorefrontQuickSearchSection.searchDropDownSuggestion}}" stepKey="dontSeeDropDownSuggestion"/>
25+
<click selector="{{StorefrontQuickSearchSection.searchPhrase}}" stepKey="clickOnSearchPhrase"/>
26+
<pressKey selector="{{StorefrontQuickSearchSection.searchPhrase}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::DOWN]" stepKey="pressDown"/>
27+
<see selector="{{StorefrontQuickSearchSection.searchDropDownSuggestion}}" stepKey="seeDropDownSuggestionSecond"/>
28+
</actionGroup>
29+
</actionGroups>
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="StorefrontVerifySearchSuggestionByControlButtonsTest">
12+
<annotations>
13+
<stories value="Search Term"/>
14+
<title value="Auto suggestion box not reappearing after clicking outside the text field"/>
15+
<description value="Auto suggestion box not reappearing after clicking outside the text field"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-40466"/>
18+
<useCaseId value="MC-40376"/>
19+
</annotations>
20+
21+
<before>
22+
<!-- Login as admin -->
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24+
25+
<!-- Create Simple Product -->
26+
<createData entity="defaultSimpleProduct" stepKey="simpleProduct"/>
27+
28+
<!-- Perform reindex and flush cache -->
29+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
30+
<argument name="indices" value=""/>
31+
</actionGroup>
32+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
33+
<argument name="tags" value=""/>
34+
</actionGroup>
35+
</before>
36+
<after>
37+
<!-- Delete create product -->
38+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
39+
40+
<!-- Go to the catalog search term page -->
41+
<actionGroup ref="AdminOpenCatalogSearchTermIndexPageActionGroup" stepKey="openAdminCatalogSearchTermIndexPage"/>
42+
43+
<!-- Filter the search term -->
44+
<actionGroup ref="AdminSearchTermFilterBySearchQueryActionGroup" stepKey="filterByThirdSearchQuery">
45+
<argument name="searchQuery" value="$$simpleProduct.name$$"/>
46+
</actionGroup>
47+
<!-- Delete created below search terms -->
48+
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
</after>
51+
52+
<!-- Go to storefront home page -->
53+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
54+
55+
<!-- Storefront quick search by product name -->
56+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName">
57+
<argument name="phrase" value="$$simpleProduct.name$$"/>
58+
</actionGroup>
59+
60+
<!-- Verify search suggestions and select the suggestion from dropdown options -->
61+
<actionGroup ref="StoreFrontAssertDropDownSearchSuggestionActionGroup" stepKey="seeDropDownSearchSuggestion">
62+
<argument name="searchQuery" value="$$simpleProduct.name$$"/>
63+
</actionGroup>
64+
</test>
65+
</tests>

0 commit comments

Comments
 (0)