Skip to content

Commit 01103d9

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #16136: Fix type hints in WebapiAsync [2.3-develop] (by @mhauri) - #16343: [Forwardport] Fix #15627: Product order in category changed in Magento 2.2.4 (by @dverkade) - #16350: Magento_Sales integration tests: fix invoice_list fixture var tags (by @evktalo) - #16332: Issue 5316 (by @lisovyievhenii) - #16148: Fixed breadcrumb quote issue in product page (by @jignesh-baldha) - #16164: 1164: OnePageCheckoutOfflinePaymentMethodsTest rework to support MSI reservation mechanism. (by @nmalevanec) Fixed GitHub Issues: - #15627: Product order in category changed after update to Magento 2.2.4 (reported by @dverkade) has been fixed in #16343 by @dverkade in 2.3-develop branch Related commits: 1. 7d26365 - #5316: [2.1.0] HTML minification problem with php tag with a comment and no space at the end (reported by @hostep) has been fixed in #16332 by @lisovyievhenii in 2.3-develop branch Related commits: 1. 544c7b6 2. 9804cb1 3. 721fe0f - #15037: Product Details Page breadcrumbs cause syntax error on products containing quotes (reported by @brian-labelle) has been fixed in #16148 by @jignesh-baldha in 2.3-develop branch Related commits: 1. e9fa7b6 2. 388b587 - #1164: locale bug (reported by @stevieyu) has been fixed in #16164 by @nmalevanec in 2.3-develop branch Related commits: 1. 25b3649 2. 6be8f8c 3. a8178be
2 parents bf71446 + 5a78f21 commit 01103d9

File tree

10 files changed

+45
-27
lines changed

10 files changed

+45
-27
lines changed

app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function setCollection($collection)
196196
$this->_collection->addAttributeToSort(
197197
$this->getCurrentOrder(),
198198
$this->getCurrentDirection()
199-
)->addAttributeToSort('entity_id', $this->getCurrentDirection());
199+
);
200200
} else {
201201
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
202202
}

app/code/Magento/WebapiAsync/Controller/Rest/AsynchronousRequestProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class AsynchronousRequestProcessor implements RequestProcessorInterface
6363
* @param RestResponse $response
6464
* @param InputParamsResolver $inputParamsResolver
6565
* @param MassSchedule $asyncBulkPublisher
66-
* @param WebapiAsyncConfig $webapiAsyncConfig
66+
* @param WebApiAsyncConfig $webapiAsyncConfig
6767
* @param DataObjectProcessor $dataObjectProcessor
6868
* @param AsyncResponseInterfaceFactory $asyncResponse
6969
* @param string $processorPath

app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use Magento\Framework\Serialize\SerializerInterface;
1212
use Magento\Webapi\Model\Cache\Type\Webapi as WebapiCache;
13-
use Magento\WebapiAsync\Model\ServiceConfig\Converter;
1413
use Magento\Webapi\Model\Config\Converter as WebapiConverter;
1514
use Magento\Webapi\Model\Config;
1615

@@ -42,7 +41,7 @@ class BulkServiceConfig implements \Magento\Webapi\Model\ConfigInterface
4241
* Initialize dependencies.
4342
*
4443
* @param WebapiCache $cache
45-
* @param Config $configReader
44+
* @param Config $webapiConfig
4645
* @param SerializerInterface $serializer
4746
*/
4847
public function __construct(

dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertMinicartEmpty.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class AssertMinicartEmpty extends AbstractConstraint
2727
public function processAssert(
2828
CmsIndex $cmsIndex
2929
) {
30+
$cmsIndex->open();
3031
\PHPUnit\Framework\Assert::assertEquals(
3132
self::TEXT_EMPTY_MINICART,
3233
$cmsIndex->getCartSidebarBlock()->getEmptyMessage(),

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/OnePageCheckoutOfflinePaymentMethodsTest.xml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<data name="shipping/shipping_method" xsi:type="string">Fixed</data>
2020
<data name="payment/method" xsi:type="string">checkmo</data>
2121
<data name="configData" xsi:type="string">checkmo, disable_guest_checkout, disable_customer_redirect_after_logging</data>
22-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
22+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
2323
</variation>
2424
<variation name="OnePageCheckoutUsingRegisterLink" summary="Customer is redirected to checkout on login if guest is disabled, flow with registration new Customer" ticketId="MAGETWO-49917">
2525
<data name="issue" xsi:type="string">MAGETWO-59816: Redirect works improperly in a browser incognito mode</data>
@@ -35,7 +35,7 @@
3535
<data name="shippingAddress/dataset" xsi:type="string">US_address_1_without_email</data>
3636
<data name="payment/method" xsi:type="string">checkmo</data>
3737
<data name="configData" xsi:type="string">checkmo, disable_guest_checkout, disable_customer_redirect_after_logging, enable_https_frontend_only</data>
38-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
38+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
3939
</variation>
4040
<variation name="OnePageCheckoutTestVariation1" summary="Checkout as UK guest with virtual product and downloadable product using coupon for not logged in customers">
4141
<data name="tag" xsi:type="string">severity:S0</data>
@@ -51,7 +51,6 @@
5151
<data name="status" xsi:type="string">Pending</data>
5252
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Invoice, Edit</data>
5353
<data name="configData" xsi:type="string">checkmo_specificcountry_gb</data>
54-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
5554
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
5655
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
5756
<constraint name="Magento\Sales\Test\Constraint\AssertOrderButtonsAvailable" />
@@ -70,10 +69,10 @@
7069
<item name="grandTotal" xsi:type="string">285.00</item>
7170
</data>
7271
<data name="payment/method" xsi:type="string">banktransfer</data>
73-
<data name="status" xsi:type="string">Pending</data>
74-
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Ship, Invoice, Edit</data>
72+
<data name="status" xsi:type="string">Processing</data>
73+
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Invoice, Edit</data>
7574
<data name="configData" xsi:type="string">banktransfer</data>
76-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
75+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
7776
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
7877
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
7978
<constraint name="Magento\Sales\Test\Constraint\AssertOrderButtonsAvailable" />
@@ -93,10 +92,10 @@
9392
<item name="grandTotal" xsi:type="string">375.00</item>
9493
</data>
9594
<data name="payment/method" xsi:type="string">banktransfer</data>
96-
<data name="status" xsi:type="string">Pending</data>
97-
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Ship, Invoice, Edit</data>
95+
<data name="status" xsi:type="string">Precessing</data>
96+
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Invoice, Edit</data>
9897
<data name="configData" xsi:type="string">banktransfer_specificcountry_gb, can_subtract_and_can_back_in_stock</data>
99-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
98+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
10099
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
101100
<constraint name="Magento\Catalog\Test\Constraint\AssertProductsOutOfStock" />
102101
<constraint name="Magento\Catalog\Test\Constraint\AssertProductsQtyAndStockStatusInAdminPanel" />
@@ -123,7 +122,7 @@
123122
<data name="billingCheckboxState" xsi:type="string">Yes</data>
124123
<data name="payment/method" xsi:type="string">checkmo</data>
125124
<data name="configData" xsi:type="string">checkmo</data>
126-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
125+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
127126
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
128127
<constraint name="Magento\Sales\Test\Constraint\AssertOrderGrandTotal"/>
129128
</variation>
@@ -149,7 +148,7 @@
149148
<data name="refresh" xsi:type="boolean">true</data>
150149
<data name="payment/method" xsi:type="string">checkmo</data>
151150
<data name="configData" xsi:type="string">checkmo, freeshipping_minimum_order_amount_100</data>
152-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
151+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
153152
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
154153
<constraint name="Magento\Sales\Test\Constraint\AssertOrderGrandTotal" />
155154
<constraint name="Magento\Sales\Test\Constraint\AssertOrderAddresses" />
@@ -168,7 +167,6 @@
168167
<data name="status" xsi:type="string">Pending</data>
169168
<data name="orderButtonsAvailable" xsi:type="string">Back, Cancel, Send Email, Hold, Invoice, Edit</data>
170169
<data name="configData" xsi:type="string">zero_subtotal_checkout</data>
171-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
172170
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
173171
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
174172
<constraint name="Magento\Sales\Test\Constraint\AssertOrderButtonsAvailable" />
@@ -185,9 +183,9 @@
185183
<item name="grandTotal" xsi:type="string">375</item>
186184
</data>
187185
<data name="payment/method" xsi:type="string">checkmo</data>
188-
<data name="status" xsi:type="string">Pending</data>
186+
<data name="status" xsi:type="string">Processing</data>
189187
<data name="orderButtonsAvailable" xsi:type="string">Back, Send Email, Cancel, Hold, Invoice, Edit</data>
190-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
188+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
191189
<constraint name="Magento\Checkout\Test\Constraint\AssertCartIsEmpty" />
192190
<constraint name="Magento\Sales\Test\Constraint\AssertOrderStatusIsCorrect" />
193191
<constraint name="Magento\Sales\Test\Constraint\AssertOrderButtonsAvailable" />
@@ -208,7 +206,7 @@
208206
<item name="grandTotal" xsi:type="string">565.00</item>
209207
</data>
210208
<data name="payment/method" xsi:type="string">checkmo</data>
211-
<constraint name="Magento\Customer\Test\Constraint\AssertCustomerRedirectToDashboard" />
209+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
212210
<constraint name="Magento\Sales\Test\Constraint\AssertOrderGrandTotal" />
213211
</variation>
214212
<variation name="OnePageCheckoutTestVariation9" summary="One Page Checkout Products with different shipping/billing address and Tier Prices" ticketId="MAGETWO-42604">
@@ -225,7 +223,7 @@
225223
</data>
226224
<data name="payment/method" xsi:type="string">banktransfer</data>
227225
<data name="configData" xsi:type="string">banktransfer_specificcountry_gb</data>
228-
<constraint name="Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage" />
226+
<constraint name="Magento\Shipping\Test\Constraint\AssertShipmentSuccessCreateMessage" />
229227
<constraint name="Magento\Checkout\Test\Constraint\AssertMinicartEmpty" />
230228
<constraint name="Magento\Customer\Test\Constraint\AssertCustomerDefaultAddressFrontendAddressBook" />
231229
<constraint name="Magento\Sales\Test\Constraint\AssertOrderGrandTotal" />

dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/PlaceOrderStep.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
namespace Magento\Checkout\Test\TestStep;
88

99
use Magento\Checkout\Test\Constraint\AssertGrandTotalOrderReview;
10+
use Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage;
1011
use Magento\Checkout\Test\Page\CheckoutOnepage;
1112
use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
1213
use Magento\Mtf\Fixture\FixtureFactory;
14+
use Magento\Mtf\ObjectManager;
1315
use Magento\Mtf\TestStep\TestStepInterface;
1416
use Magento\Sales\Test\Fixture\OrderInjectable;
1517

@@ -32,6 +34,13 @@ class PlaceOrderStep implements TestStepInterface
3234
*/
3335
private $assertGrandTotalOrderReview;
3436

37+
/**
38+
* Assert that order success message is correct.
39+
*
40+
* @var AssertOrderSuccessPlacedMessage
41+
*/
42+
private $assertOrderSuccessPlacedMessage;
43+
3544
/**
3645
* One page checkout success page.
3746
*
@@ -75,6 +84,7 @@ class PlaceOrderStep implements TestStepInterface
7584
* @param array $products
7685
* @param array $prices
7786
* @param OrderInjectable|null $order
87+
* @param AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage
7888
*/
7989
public function __construct(
8090
CheckoutOnepage $checkoutOnepage,
@@ -83,7 +93,8 @@ public function __construct(
8393
FixtureFactory $fixtureFactory,
8494
array $products = [],
8595
array $prices = [],
86-
OrderInjectable $order = null
96+
OrderInjectable $order = null,
97+
AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage = null
8798
) {
8899
$this->checkoutOnepage = $checkoutOnepage;
89100
$this->assertGrandTotalOrderReview = $assertGrandTotalOrderReview;
@@ -92,6 +103,8 @@ public function __construct(
92103
$this->products = $products;
93104
$this->prices = $prices;
94105
$this->order = $order;
106+
$this->assertOrderSuccessPlacedMessage = $assertOrderSuccessPlacedMessage
107+
?: ObjectManager::getInstance()->create(AssertOrderSuccessPlacedMessage::class);
95108
}
96109

97110
/**
@@ -106,6 +119,7 @@ public function run()
106119
}
107120
$this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();
108121
$orderId = $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
122+
$this->assertOrderSuccessPlacedMessage->processAssert($this->checkoutOnepageSuccess);
109123
$data = [
110124
'id' => $orderId,
111125
'entity_id' => ['products' => $this->products]

dev/tests/functional/tests/app/Magento/Checkout/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
<step name="fillBillingInformation" module="Magento_Checkout" next="refreshPage" />
3939
<step name="refreshPage" module="Magento_Checkout" next="placeOrder" />
4040
<step name="placeOrder" module="Magento_Checkout" next="createCustomerAccount" />
41-
<step name="createCustomerAccount" module="Magento_Checkout" />
41+
<step name="createCustomerAccount" module="Magento_Checkout" next="createShipment" />
42+
<step name="createShipment" module="Magento_Sales"/>
4243
</scenario>
4344
<scenario name="OnePageCheckoutJsValidationTest" firstStep="setupConfiguration">
4445
<step name="setupConfiguration" module="Magento_Config" next="createProducts" />

dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
],
5454
];
5555

56-
/** @var array $creditMemoData */
56+
/** @var array $invoiceData */
5757
foreach ($invoices as $invoiceData) {
58-
/** @var \Magento\Sales\Model\Order\Creditmemo $creditMemo */
58+
/** @var \Magento\Sales\Model\Order\Invoice $invoice */
5959
$invoice = $objectManager->create(\Magento\Sales\Model\Order\Invoice::class);
6060
$invoice
6161
->setData($invoiceData)

lib/internal/Magento/Framework/View/Template/Html/Minifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public function minify($file)
131131
'#(?<!:|\\\\|\'|")//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*#',
132132
'',
133133
preg_replace(
134-
'#(?<!:|\'|")//[^\n\r]*(\s\?\>)#',
135-
'$1',
134+
'#(?<!:|\'|")//[^\n\r]*(\?\>)#',
135+
' $1',
136136
preg_replace(
137137
'#(?<!:)//[^\n\r]*(\<\?php)[^\n\r]*(\s\?\>)[^\n\r]*#',
138138
'',

lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ public function testMinify()
156156
<?php echo '//some.link.com/' ?>
157157
<em>inline text</em>
158158
<a href="http://www.<?php echo 'hi' ?>"></a>
159+
<?php// if (\$block->getSomeVariable() > 1):?>
160+
<?php echo \$block->getChildHtml('someChildBlock'); ?>
161+
<?php //else:?>
162+
<?php // echo \$block->getChildHtml('anotherChildBlock'); ?>
163+
<?php // endif; ?>
159164
</body>
160165
</html>
161166
TEXT;
@@ -179,7 +184,7 @@ public function testMinify()
179184
}
180185
});
181186
//]]>
182-
</script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
187+
</script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a> <?php ?> <?php echo \$block->getChildHtml('someChildBlock'); ?> <?php ?> <?php ?> <?php ?></body></html>
183188
TEXT;
184189

185190
$this->appDirectoryMock->expects($this->once())

0 commit comments

Comments
 (0)