Skip to content

Commit 9d6847c

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop
- merged latest code from mainline branch
2 parents d132aa0 + 14d6388 commit 9d6847c

File tree

233 files changed

+6836
-1234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+6836
-1234
lines changed

app/code/Magento/Authorizenet/Test/Unit/Model/DirectpostTest.php

Lines changed: 340 additions & 250 deletions
Large diffs are not rendered by default.

app/code/Magento/Backend/Model/Locale/Resolver.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77

88
/**
99
* Backend locale model
10+
*
1011
* @api
1112
* @since 100.0.2
13+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1214
*/
1315
class Resolver extends \Magento\Framework\Locale\Resolver
1416
{
@@ -40,7 +42,7 @@ class Resolver extends \Magento\Framework\Locale\Resolver
4042
* @param Manager $localeManager
4143
* @param \Magento\Framework\App\RequestInterface $request
4244
* @param \Magento\Framework\Validator\Locale $localeValidator
43-
* @param null $locale
45+
* @param string|null $locale
4446
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
4547
*/
4648
public function __construct(
@@ -76,7 +78,7 @@ public function setLocale($locale = null)
7678
$sessionLocale = $this->_session->getSessionLocale();
7779
$userLocale = $this->_localeManager->getUserInterfaceLocale();
7880

79-
$localeCodes = array_filter([$forceLocale, $sessionLocale, $userLocale]);
81+
$localeCodes = array_filter([$forceLocale, $locale, $sessionLocale, $userLocale]);
8082

8183
if (count($localeCodes)) {
8284
$locale = reset($localeCodes);
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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="AdminGeneralSetStoreNameConfigData">
12+
<data key="path">general/store_information/name</data>
13+
<data key="value">New Store Information</data>
14+
</entity>
15+
<entity name="AdminGeneralSetStorePhoneConfigData">
16+
<data key="path">general/store_information/phone</data>
17+
</entity>
18+
<entity name="AdminGeneralSetCountryConfigData">
19+
<data key="path">general/store_information/country_id</data>
20+
</entity>
21+
<entity name="AdminGeneralSetCityConfigData">
22+
<data key="path">general/store_information/city</data>
23+
</entity>
24+
<entity name="AdminGeneralSetPostcodeConfigData">
25+
<data key="path">general/store_information/postcode</data>
26+
</entity>
27+
<entity name="AdminGeneralSetStreetAddressConfigData">
28+
<data key="path">general/store_information/street_line1</data>
29+
</entity>
30+
<entity name="AdminGeneralSetStreetAddress2ConfigData">
31+
<data key="path">general/store_information/street_line2</data>
32+
</entity>
33+
</entities>

app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@
6161
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
6262
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
6363
</entity>
64+
<entity name="ApiBundleProductUnderscoredSku" type="product2">
65+
<data key="name" unique="suffix">Api Bundle Product</data>
66+
<data key="sku" unique="suffix">api_bundle_product</data>
67+
<data key="type_id">bundle</data>
68+
<data key="attribute_set_id">4</data>
69+
<data key="visibility">4</data>
70+
<data key="status">1</data>
71+
<data key="urlKey" unique="suffix">api-bundle-product</data>
72+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
73+
<requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity>
74+
<requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity>
75+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
76+
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
77+
</entity>
6478
<entity name="ApiBundleProductPriceViewRange" type="product2">
6579
<data key="name" unique="suffix">Api Bundle Product</data>
6680
<data key="sku" unique="suffix">api-bundle-product</data>

app/code/Magento/Bundle/Test/Mftf/Test/AdvanceCatalogSearchBundleProductTest.xml

Lines changed: 174 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,47 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MC-139"/>
1919
<group value="Bundle"/>
20+
<group value="SearchEngineElasticsearch"/>
21+
</annotations>
22+
<before>
23+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
24+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
25+
<createData entity="ApiBundleProduct" stepKey="product"/>
26+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
27+
<requiredEntity createDataKey="product"/>
28+
</createData>
29+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
30+
<requiredEntity createDataKey="product"/>
31+
<requiredEntity createDataKey="bundleOption"/>
32+
<requiredEntity createDataKey="simple1"/>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="product"/>
36+
<requiredEntity createDataKey="bundleOption"/>
37+
<requiredEntity createDataKey="simple2"/>
38+
</createData>
39+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
40+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
44+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
45+
</after>
46+
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47+
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48+
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
49+
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
50+
</test>
51+
<test name="AdvanceCatalogSearchBundleByNameMysqlTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
52+
<annotations>
53+
<features value="Bundle"/>
54+
<stories value="Advanced Catalog Product Search for all product types"/>
55+
<title value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/>
56+
<description value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/>
57+
<severity value="MAJOR"/>
58+
<testCaseId value="MC-20472"/>
59+
<group value="Bundle"/>
60+
<group value="SearchEngineMysql"/>
2061
</annotations>
2162
<before>
2263
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
@@ -56,7 +97,7 @@
5697
<before>
5798
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
5899
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
59-
<createData entity="ApiBundleProduct" stepKey="product"/>
100+
<createData entity="ApiBundleProductUnderscoredSku" stepKey="product"/>
60101
<createData entity="DropDownBundleOption" stepKey="bundleOption">
61102
<requiredEntity createDataKey="product"/>
62103
</createData>
@@ -87,6 +128,47 @@
87128
<severity value="MAJOR"/>
88129
<testCaseId value="MC-242"/>
89130
<group value="Bundle"/>
131+
<group value="SearchEngineElasticsearch"/>
132+
</annotations>
133+
<before>
134+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
135+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
136+
<createData entity="ApiBundleProduct" stepKey="product"/>
137+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
138+
<requiredEntity createDataKey="product"/>
139+
</createData>
140+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
141+
<requiredEntity createDataKey="product"/>
142+
<requiredEntity createDataKey="bundleOption"/>
143+
<requiredEntity createDataKey="simple1"/>
144+
</createData>
145+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
146+
<requiredEntity createDataKey="product"/>
147+
<requiredEntity createDataKey="bundleOption"/>
148+
<requiredEntity createDataKey="simple2"/>
149+
</createData>
150+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
151+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
152+
</before>
153+
<after>
154+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
155+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
156+
</after>
157+
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
158+
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
159+
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
160+
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
161+
</test>
162+
<test name="AdvanceCatalogSearchBundleByDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
163+
<annotations>
164+
<features value="Bundle"/>
165+
<stories value="Advanced Catalog Product Search for all product types"/>
166+
<title value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/>
167+
<description value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/>
168+
<severity value="MAJOR"/>
169+
<testCaseId value="MC-20473"/>
170+
<group value="Bundle"/>
171+
<group value="SearchEngineMysql"/>
90172
</annotations>
91173
<before>
92174
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
@@ -122,6 +204,47 @@
122204
<severity value="MAJOR"/>
123205
<testCaseId value="MC-250"/>
124206
<group value="Bundle"/>
207+
<group value="SearchEngineElasticsearch"/>
208+
</annotations>
209+
<before>
210+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
211+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
212+
<createData entity="ApiBundleProduct" stepKey="product"/>
213+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
214+
<requiredEntity createDataKey="product"/>
215+
</createData>
216+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
217+
<requiredEntity createDataKey="product"/>
218+
<requiredEntity createDataKey="bundleOption"/>
219+
<requiredEntity createDataKey="simple1"/>
220+
</createData>
221+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
222+
<requiredEntity createDataKey="product"/>
223+
<requiredEntity createDataKey="bundleOption"/>
224+
<requiredEntity createDataKey="simple2"/>
225+
</createData>
226+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
227+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
228+
</before>
229+
<after>
230+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
231+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
232+
</after>
233+
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
234+
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
235+
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
236+
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
237+
</test>
238+
<test name="AdvanceCatalogSearchBundleByShortDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByShortDescriptionTest">
239+
<annotations>
240+
<features value="Bundle"/>
241+
<stories value="Advanced Catalog Product Search for all product types"/>
242+
<title value="Guest customer should be able to advance search Bundle product with product short description using the MySQL search engine"/>
243+
<description value="Guest customer should be able to advance search Bundle product with product short description using the MySQL search engine"/>
244+
<severity value="MAJOR"/>
245+
<testCaseId value="MC-20474"/>
246+
<group value="Bundle"/>
247+
<group value="SearchEngineMysql"/>
125248
</annotations>
126249
<before>
127250
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
@@ -157,6 +280,56 @@
157280
<severity value="MAJOR"/>
158281
<testCaseId value="MC-251"/>
159282
<group value="Bundle"/>
283+
<group value="SearchEngineElasticsearch"/>
284+
</annotations>
285+
<before>
286+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
287+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
288+
<createData entity="ApiBundleProduct" stepKey="product"/>
289+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
290+
<requiredEntity createDataKey="product"/>
291+
</createData>
292+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
293+
<requiredEntity createDataKey="product"/>
294+
<requiredEntity createDataKey="bundleOption"/>
295+
<requiredEntity createDataKey="simple1"/>
296+
</createData>
297+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
298+
<requiredEntity createDataKey="product"/>
299+
<requiredEntity createDataKey="bundleOption"/>
300+
<requiredEntity createDataKey="simple2"/>
301+
</createData>
302+
<getData entity="GetProduct" stepKey="arg1">
303+
<requiredEntity createDataKey="product"/>
304+
</getData>
305+
<getData entity="GetProduct" stepKey="arg2">
306+
<requiredEntity createDataKey="simple1"/>
307+
</getData>
308+
<getData entity="GetProduct" stepKey="arg3">
309+
<requiredEntity createDataKey="simple2"/>
310+
</getData>
311+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
312+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
313+
</before>
314+
<after>
315+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
316+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
317+
</after>
318+
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
319+
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
320+
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
321+
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
322+
</test>
323+
<test name="AdvanceCatalogSearchBundleByPriceMysqlTest" extends="AdvanceCatalogSearchSimpleProductByPriceTest">
324+
<annotations>
325+
<features value="Bundle"/>
326+
<stories value="Advanced Catalog Product Search for all product types"/>
327+
<title value="Guest customer should be able to advance search Bundle product with product price using the MySQL search engine"/>
328+
<description value="Guest customer should be able to advance search Bundle product with product price the MySQL search engine"/>
329+
<severity value="MAJOR"/>
330+
<testCaseId value="MC-20475"/>
331+
<group value="Bundle"/>
332+
<group value="SearchEngineMysql"/>
160333
</annotations>
161334
<before>
162335
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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="StorefrontAdvanceCatalogSearchBundleBySkuWithHyphenTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Advanced Catalog Product Search for all product types "/>
15+
<title value="Guest customer should be able to advance search Bundle product with product sku that contains hyphen"/>
16+
<description value="Guest customer should be able to advance search Bundle product with product sku that contains hyphen"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20359"/>
19+
<group value="Bundle"/>
20+
<group value="SearchEngineMysql"/>
21+
</annotations>
22+
<before>
23+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
24+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
25+
<createData entity="ApiBundleProduct" stepKey="product"/>
26+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
27+
<requiredEntity createDataKey="product"/>
28+
</createData>
29+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
30+
<requiredEntity createDataKey="product"/>
31+
<requiredEntity createDataKey="bundleOption"/>
32+
<requiredEntity createDataKey="simple1"/>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="product"/>
36+
<requiredEntity createDataKey="bundleOption"/>
37+
<requiredEntity createDataKey="simple2"/>
38+
</createData>
39+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
40+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
44+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
45+
</after>
46+
</test>
47+
</tests>

0 commit comments

Comments
 (0)