Skip to content

Commit 5c70bb7

Browse files
authored
Merge pull request #3111 from magento-honey-badgers/2.3-regression-pr-HB
[2.3 regression team] Bugs
2 parents a04f913 + f671163 commit 5c70bb7

File tree

16 files changed

+127
-17
lines changed

16 files changed

+127
-17
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptions.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{ProductOptionField.title}}" stepKey="seeProductOptionFieldInput1"/>
9696
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{ProductOptionArea.title}}" stepKey="seeProductOptionAreaInput1"/>
9797
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{productWithOptions.file}}" stepKey="seeProductOptionFileInput1"/>
98+
<seeElement selector="{{CheckoutPaymentSection.ProductOptionLinkActiveByProductItemName($createProduct.name$, productWithOptions.file)}}" stepKey="seeProductOptionFileInputLink1"/>
9899
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{ProductOptionValueDropdown1.title}}" stepKey="seeProductOptionValueDropdown1Input1"/>
99100
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{ProductOptionValueRadioButtons1.title}}" stepKey="seeProductOptionValueRadioButtons1Input1"/>
100101
<see selector="{{CheckoutPaymentSection.ProductOptionsActiveByProductItemName($createProduct.name$)}}" userInput="{{ProductOptionValueCheckbox.title}}" stepKey="seeProductOptionValueCheckboxInput1" />
@@ -128,6 +129,7 @@
128129
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionField.title}}" stepKey="seeAdminOrderProductOptionField" />
129130
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionArea.title}}" stepKey="seeAdminOrderProductOptionArea"/>
130131
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{productWithOptions.file}}" stepKey="seeAdminOrderProductOptionFile"/>
132+
<seeElement selector="{{AdminOrderItemsOrderedSection.productNameOptionsLink(productWithOptions.file)}}" stepKey="seeAdminOrderProductOptionFileLink"/>
131133
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueDropdown1.title}}" stepKey="seeAdminOrderProductOptionValueDropdown1"/>
132134
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueRadioButtons1.title}}" stepKey="seeAdminOrderProductOptionValueRadioButton1"/>
133135
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueCheckbox.title}}" stepKey="seeAdminOrderProductOptionValueCheckbox" />
@@ -144,6 +146,7 @@
144146
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionField.title}}" stepKey="seeAdminOrderProductOptionField1" />
145147
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionArea.title}}" stepKey="seeAdminOrderProductOptionArea1"/>
146148
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{productWithOptions.file}}" stepKey="seeAdminOrderProductOptionFile1"/>
149+
<seeElement selector="{{AdminOrderItemsOrderedSection.productNameOptionsLink(productWithOptions.file)}}" stepKey="seeAdminOrderProductOptionFileLink1"/>
147150
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueDropdown1.title}}" stepKey="seeAdminOrderProductOptionValueDropdown11"/>
148151
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueRadioButtons1.title}}" stepKey="seeAdminOrderProductOptionValueRadioButton11"/>
149152
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="{{ProductOptionValueCheckbox.title}}" stepKey="seeAdminOrderProductOptionValueCheckbox1" />
@@ -161,6 +164,7 @@
161164
<see selector="{{StorefrontCustomerOrderSection.productCustomOptions($createProduct.name$, ProductOptionField.title, ProductOptionField.title)}}" userInput="{{ProductOptionField.title}}" stepKey="seeStorefontOrderProductOptionField1" />
162165
<see selector="{{StorefrontCustomerOrderSection.productCustomOptions($createProduct.name$, ProductOptionArea.title, ProductOptionArea.title)}}" userInput="{{ProductOptionArea.title}}" stepKey="seeStorefontOrderProductOptionArea1"/>
163166
<see selector="{{StorefrontCustomerOrderSection.productCustomOptionsFile($createProduct.name$, ProductOptionFile.title, productWithOptions.file)}}" userInput="{{productWithOptions.file}}" stepKey="seeStorefontOrderProductOptionFile1"/>
167+
<seeElement selector="{{StorefrontCustomerOrderSection.productCustomOptionsLink($createProduct.name$, ProductOptionFile.title, productWithOptions.file)}}" stepKey="seeStorefontOrderProductOptionFileLink1"/>
164168
<see selector="{{StorefrontCustomerOrderSection.productCustomOptions($createProduct.name$, ProductOptionDropDown.title, ProductOptionValueDropdown1.title)}}" userInput="{{ProductOptionValueDropdown1.title}}" stepKey="seeStorefontOrderProductOptionValueDropdown11"/>
165169
<see selector="{{StorefrontCustomerOrderSection.productCustomOptions($createProduct.name$, ProductOptionRadiobutton.title, ProductOptionValueRadioButtons1.title)}}" userInput="{{ProductOptionValueRadioButtons1.title}}" stepKey="seeStorefontOrderProductOptionValueRadioButtons11"/>
166170
<see selector="{{StorefrontCustomerOrderSection.productCustomOptions($createProduct.name$, ProductOptionCheckbox.title, ProductOptionValueCheckbox.title)}}" userInput="{{ProductOptionValueCheckbox.title}}" stepKey="seeStorefontOrderProductOptionValueCheckbox1" />

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<element name="ProductItemByName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']" parameterized="true" />
3737
<element name="ProductOptionsByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options']" parameterized="true" />
3838
<element name="ProductOptionsActiveByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options active']" parameterized="true" />
39+
<element name="ProductOptionLinkActiveByProductItemName" type="text" selector="//div[@class='product-item-details']//strong[@class='product-item-name'][text()='{{var1}}']//ancestor::div[@class='product-item-details']//div[@class='product options active']//a[text() = '{{var2}}']" parameterized="true" />
3940
<element name="shipToInformation" type="text" selector="//div[@class='ship-to']//div[@class='shipping-information-content']" />
4041
<element name="shippingMethodInformation" type="text" selector="//div[@class='ship-via']//div[@class='shipping-information-content']" />
4142
<element name="paymentMethodTitle" type="text" selector=".payment-method-title span" />

app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<span data-bind="html: option.value.join('<br>')"></span>
4646
<!-- /ko -->
4747
<!-- ko ifnot: Array.isArray(option.value) -->
48-
<span data-bind="text: option.value"></span>
48+
<span data-bind="html: option.value"></span>
4949
<!-- /ko -->
5050
</dd>
5151
<!-- /ko -->

app/code/Magento/Checkout/view/frontend/web/template/summary/item/details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<dd class="values" data-bind="html: full_view"></dd>
3636
<!-- /ko -->
3737
<!-- ko ifnot: ($data.full_view)-->
38-
<dd class="values" data-bind="text: value"></dd>
38+
<dd class="values" data-bind="html: value"></dd>
3939
<!-- /ko -->
4040
<!-- /ko -->
4141
</dl>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerOrderSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
<section name="StorefrontCustomerOrderSection">
1212
<element name="productCustomOptions" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[normalize-space(.)='{{var3}}']" parameterized="true"/>
1313
<element name="productCustomOptionsFile" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd[contains(.,'{{var3}}')]" parameterized="true"/>
14+
<element name="productCustomOptionsLink" type="text" selector="//strong[contains(@class, 'product-item-name') and normalize-space(.)='{{var1}}']/following-sibling::*[contains(@class, 'item-options')]/dt[normalize-space(.)='{{var2}}']/following-sibling::dd//a[text() = '{{var3}}']" parameterized="true"/>
1415
</section>
1516
</sections>

app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function execute()
6868
if ($order->getIncrementId()) {
6969
if ($this->checkOrderState($order)) {
7070
$redirectBlock->setData('goto_success_page', true);
71+
$this->_eventManager->dispatch('paypal_checkout_success', ['order' => $order]);
7172
} else {
7273
if ($this->checkPaymentMethod($order)) {
7374
$gotoSection = $this->_cancelPayment((string)$this->getRequest()->getParam('RESPMSG'));

app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Paypal\Test\Unit\Controller\Payflow;
77

8+
use Magento\Framework\Event\ManagerInterface;
89
use Magento\Sales\Api\PaymentFailuresInterface;
910
use Magento\Checkout\Block\Onepage\Success;
1011
use Magento\Checkout\Model\Session;
@@ -96,6 +97,11 @@ class ReturnUrlTest extends \PHPUnit\Framework\TestCase
9697
*/
9798
private $paymentFailures;
9899

100+
/**
101+
* @var ManagerInterface|\PHPUnit_Framework_MockObject_MockObject
102+
*/
103+
private $eventManagerMock;
104+
99105
/**
100106
* @inheritdoc
101107
*/
@@ -148,25 +154,31 @@ protected function setUp()
148154
->disableOriginalConstructor()
149155
->getMock();
150156

151-
$this->context->expects($this->any())->method('getView')->willReturn($this->view);
152-
$this->context->expects($this->any())->method('getRequest')->willReturn($this->request);
153-
154157
$this->paymentFailures = $this->getMockBuilder(PaymentFailuresInterface::class)
155158
->disableOriginalConstructor()
156159
->getMock();
157160

161+
$this->eventManagerMock = $this->getMockBuilder(ManagerInterface::class)
162+
->disableOriginalConstructor()
163+
->getMock();
164+
158165
$this->context->method('getView')
159166
->willReturn($this->view);
160167
$this->context->method('getRequest')
161168
->willReturn($this->request);
162-
163-
$this->returnUrl = $this->objectManager->getObject(ReturnUrl::class, [
164-
'context' => $this->context,
165-
'checkoutSession' => $this->checkoutSession,
166-
'orderFactory' => $this->orderFactory,
167-
'checkoutHelper' => $this->checkoutHelper,
168-
'paymentFailures' => $this->paymentFailures,
169-
]);
169+
$this->context->method('getEventManager')
170+
->willReturn($this->eventManagerMock);
171+
172+
$this->returnUrl = $this->objectManager->getObject(
173+
ReturnUrl::class,
174+
[
175+
'context' => $this->context,
176+
'checkoutSession' => $this->checkoutSession,
177+
'orderFactory' => $this->orderFactory,
178+
'checkoutHelper' => $this->checkoutHelper,
179+
'paymentFailures' => $this->paymentFailures,
180+
]
181+
);
170182
}
171183

172184
/**
@@ -187,6 +199,10 @@ public function testExecuteAllowedOrderState($state)
187199
->with('goto_success_page', true)
188200
->willReturnSelf();
189201

202+
$this->eventManagerMock->expects($this->once())
203+
->method('dispatch')
204+
->with('paypal_checkout_success', $this->arrayHasKey('order'));
205+
190206
$result = $this->returnUrl->execute();
191207
$this->assertNull($result);
192208
}

app/code/Magento/Sales/Test/Mftf/Section/AdminOrderItemsOrderedSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
<element name="productNameColumn" type="text" selector=".edit-order-table .col-product .product-title"/>
2525
<element name="productNameOptions" type="text" selector=".edit-order-table .col-product .item-options"/>
26+
<element name="productNameOptionsLink" type="text" selector="//table[contains(@class, 'edit-order-table')]//td[contains(@class, 'col-product')]//a[text() = '{{var1}}']" parameterized="true"/>
2627
<element name="productSkuColumn" type="text" selector=".edit-order-table .col-product .product-sku-block"/>
2728
<element name="statusColumn" type="text" selector=".edit-order-table .col-status"/>
2829
<element name="originalPriceColumn" type="text" selector=".edit-order-table .col-original-price .price"/>

app/code/Magento/Sales/view/frontend/templates/order/items/renderer/default.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ $_item = $block->getItem();
2020
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
2121
<dd>
2222
<?php if (isset($_formatedOptionValue['full_view'])): ?>
23-
<?= $block->escapeHtml($_formatedOptionValue['full_view']) ?>
23+
<?= $block->escapeHtml($_formatedOptionValue['full_view'], ['a']) ?>
2424
<?php else: ?>
25-
<?=$block->escapeHtml($_formatedOptionValue['value']) ?>
25+
<?=$block->escapeHtml($_formatedOptionValue['value'], ['a']) ?>
2626
<?php endif; ?>
2727
</dd>
2828
<?php else: ?>

app/code/Magento/Signifyd/Observer/PlaceOrder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\Event\ObserverInterface;
1111
use Magento\Framework\Exception\AlreadyExistsException;
1212
use Magento\Sales\Api\Data\OrderInterface;
13+
use Magento\Sales\Model\Order;
1314
use Magento\Signifyd\Api\CaseCreationServiceInterface;
1415
use Magento\Signifyd\Model\Config;
1516
use Psr\Log\LoggerInterface;
@@ -80,7 +81,9 @@ public function execute(Observer $observer)
8081
private function createCaseForOrder($order)
8182
{
8283
$orderId = $order->getEntityId();
83-
if (null === $orderId || $order->getPayment()->getMethodInstance()->isOffline()) {
84+
if (null === $orderId
85+
|| $order->getPayment()->getMethodInstance()->isOffline()
86+
|| $order->getState() === Order::STATE_PENDING_PAYMENT) {
8487
return;
8588
}
8689

0 commit comments

Comments
 (0)