|
74 | 74 | </test>
|
75 | 75 | <test name="QuickSearchEmptyResults">
|
76 | 76 | <annotations>
|
| 77 | + <features value="CatalogSearch"/> |
77 | 78 | <stories value="Search Product on Storefront"/>
|
78 | 79 | <title value="User should not get search results on query that doesn't return anything"/>
|
79 | 80 | <description value="Use invalid query to return no products"/>
|
|
89 | 90 | </createData>
|
90 | 91 | </before>
|
91 | 92 | <after>
|
92 |
| - <deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/> |
93 |
| - <deleteData stepKey="deleteCategory" createDataKey="createCategory"/> |
| 93 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> |
| 94 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
94 | 95 | </after>
|
95 | 96 |
|
96 | 97 | <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontPage"/>
|
|
99 | 100 | </actionGroup>
|
100 | 101 | <actionGroup ref="StorefrontCheckSearchIsEmpty" stepKey="checkEmpty"/>
|
101 | 102 | </test>
|
| 103 | + |
102 | 104 | <test name="QuickSearchWithTwoCharsEmptyResults" extends="QuickSearchEmptyResults">
|
103 | 105 | <annotations>
|
104 | 106 | <features value="CatalogSearch"/>
|
|
110 | 112 | <group value="CatalogSearch"/>
|
111 | 113 | <group value="mtf_migrated"/>
|
112 | 114 | </annotations>
|
| 115 | + |
| 116 | + <before> |
| 117 | + <magentoCLI command="config:set {{MinimalQueryLengthFourConfigData.path}} {{MinimalQueryLengthFourConfigData.value}}" after="createSimpleProduct" stepKey="setMinimalQueryLengthToFour"/> |
| 118 | + </before> |
| 119 | + |
| 120 | + <after> |
| 121 | + <magentoCLI command="config:set {{MinimalQueryLengthDefaultConfigData.path}} {{MinimalQueryLengthDefaultConfigData.value}}" after="deleteCategory" stepKey="setMinimalQueryLengthToFour"/> |
| 122 | + </after> |
| 123 | + |
113 | 124 | <executeJS function="var s = '$createSimpleProduct.name$'; var ret=s.substring(0,2); return ret;" before="searchStorefront" stepKey="getFirstTwoLetters"/>
|
114 |
| - <executeJS function="var s = '$createSimpleProduct.name$'; var ret=s.substring(0,3); return ret;" before="searchStorefront" stepKey="getFirstThreeLetters"/> |
| 125 | + <executeJS function="var s = '$createSimpleProduct.name$'; var ret=s.substring(0,{{MinimalQueryLengthFourConfigData.value}}); return ret;" after="getFirstTwoLetters" stepKey="getFirstConfigLetters"/> |
115 | 126 |
|
116 |
| - <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" after="checkEmpty" stepKey="searchStorefrontThreeLetters"> |
117 |
| - <argument name="phrase" value="$getFirstThreeLetters"/> |
| 127 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" after="checkEmpty" stepKey="searchStorefrontConfigLetters"> |
| 128 | + <argument name="phrase" value="$getFirstConfigLetters"/> |
118 | 129 | </actionGroup>
|
119 |
| - <actionGroup ref="StorefrontQuickSearchTooShortStringActionGroup" after="searchStorefrontThreeLetters" stepKey="checkCannotSearchWithTooShortString"> |
| 130 | + <actionGroup ref="StorefrontQuickSearchTooShortStringActionGroup" after="searchStorefrontConfigLetters" stepKey="checkCannotSearchWithTooShortString"> |
120 | 131 | <argument name="phrase" value="$getFirstTwoLetters"/>
|
| 132 | + <argument name="minQueryLength" value="{{MinimalQueryLengthFourConfigData.value}}"/> |
121 | 133 | </actionGroup>
|
122 | 134 | <actionGroup ref="StorefrontQuickSearchRelatedSearchTermsAppearsActionGroup" after="checkCannotSearchWithTooShortString" stepKey="checkRelatedSearchTerm">
|
123 |
| - <argument name="term" value="$getFirstThreeLetters"/> |
| 135 | + <argument name="term" value="$getFirstConfigLetters"/> |
124 | 136 | </actionGroup>
|
125 | 137 | </test>
|
| 138 | + |
126 | 139 | <test name="QuickSearchProductByNameWithThreeLetters" extends="QuickSearchProductBySku">
|
127 | 140 | <annotations>
|
128 | 141 | <stories value="Search Product on Storefront"/>
|
|
0 commit comments