Skip to content

Commit abc7fb3

Browse files
committed
ACP2E-2272: Search suggesions not working on mini search form
1 parent 8f88c18 commit abc7fb3

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DisableSearchSuggestions">
12+
<data key="path">catalog/search/search_suggestion_enabled</data>
13+
<data key="value">0</data>
14+
</entity>
15+
<entity name="EnableSearchSuggestions">
16+
<data key="path">catalog/search/search_suggestion_enabled</data>
17+
<data key="value">1</data>
18+
</entity>
19+
</entities>

app/code/Magento/Search/Test/Mftf/Test/AutoCompleteSearchTermsAndPhrasesWhileUserIsTypingTest.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
<argument name="indices" value=""/>
2626
</actionGroup>
2727
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
28+
<!-- Disable search suggestions -->
29+
<magentoCLI command="config:set {{DisableSearchSuggestions.path}} {{DisableSearchSuggestions.value}}" after="flushCache" stepKey="DisableSearchSuggestions"/>
30+
<!-- Clean config cache -->
31+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCacheAfterDisablingSuggestions">
32+
<argument name="tags" value="config"/>
33+
</actionGroup>
2834
</before>
2935
<after>
3036
<!-- Delete create product -->
@@ -42,6 +48,12 @@
4248
<!-- Delete created below search terms -->
4349
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
4450
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
51+
<!-- Re-enable search suggestions -->
52+
<magentoCLI command="config:set {{EnableSearchSuggestions.path}} {{EnableSearchSuggestions.value}}" after="logout" stepKey="EnableSearchSuggestions"/>
53+
<!-- Clean config cache -->
54+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCacheAfterEnablingSuggestions">
55+
<argument name="tags" value="config"/>
56+
</actionGroup>
4557
</after>
4658
<!-- Go to storefront home page -->
4759
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>

app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
<actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteAllProducts"/>
2828
<!-- Create product with description -->
2929
<createData entity="SimpleProductWithDescription" stepKey="simpleProduct"/>
30+
<!-- Disable search suggestions -->
31+
<magentoCLI command="config:set {{DisableSearchSuggestions.path}} {{DisableSearchSuggestions.value}}" after="simpleProduct" stepKey="DisableSearchSuggestions"/>
3032

3133
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
3234
<argument name="indices" value=""/>
3335
</actionGroup>
3436
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
35-
<argument name="tags" value="full_page"/>
37+
<argument name="tags" value="full_page, config"/>
3638
</actionGroup>
3739
</before>
3840
<after>
@@ -47,6 +49,12 @@
4749
<!-- Delete created below search terms -->
4850
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
4951
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
52+
<!-- Re-enable search suggestions -->
53+
<magentoCLI command="config:set {{EnableSearchSuggestions.path}} {{EnableSearchSuggestions.value}}" after="logout" stepKey="EnableSearchSuggestions"/>
54+
<!-- Clean config cache -->
55+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCacheAfterEnablingSuggestions">
56+
<argument name="tags" value="config"/>
57+
</actionGroup>
5058
</after>
5159
<!-- Go to storefront home page -->
5260
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>

app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<argument name="indices" value=""/>
3131
</actionGroup>
3232
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
33+
<!-- Disable search suggestions -->
34+
<magentoCLI command="config:set {{DisableSearchSuggestions.path}} {{DisableSearchSuggestions.value}}" after="flushCache" stepKey="DisableSearchSuggestions"/>
35+
<!-- Clean config cache -->
36+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCacheAfterDisablingSuggestions">
37+
<argument name="tags" value="config"/>
38+
</actionGroup>
3339
</before>
3440
<after>
3541

@@ -47,6 +53,13 @@
4753
<!-- Delete created below search terms -->
4854
<actionGroup ref="AdminDeleteSearchTermActionGroup" stepKey="deleteSearchTerms"/>
4955
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
56+
57+
<!-- Re-enable search suggestions -->
58+
<magentoCLI command="config:set {{EnableSearchSuggestions.path}} {{EnableSearchSuggestions.value}}" after="logout" stepKey="EnableSearchSuggestions"/>
59+
<!-- Clean config cache -->
60+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanConfigCacheAfterEnablingSuggestions">
61+
<argument name="tags" value="config"/>
62+
</actionGroup>
5063
</after>
5164

5265
<!-- Go to storefront home page -->

0 commit comments

Comments
 (0)