Skip to content

Commit 879d80e

Browse files
committed
Merge remote-tracking branch 'magento-l3/ACP2E-2709' into Tier4-Kings-PR-03-21-2024
2 parents a98a64a + cb8e7c5 commit 879d80e

File tree

3 files changed

+61
-5
lines changed

3 files changed

+61
-5
lines changed

app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
class History extends \Magento\Backend\Block\Template
1515
{
1616
/**
17-
* Core registry
18-
*
1917
* @var \Magento\Framework\Registry
2018
*/
2119
protected $_coreRegistry = null;
2220

2321
/**
24-
* Sales data
25-
*
2622
* @var \Magento\Sales\Helper\Data
2723
*/
2824
protected $_salesData = null;
@@ -63,7 +59,7 @@ protected function _prepareLayout()
6359
$button = $this->getLayout()->createBlock(
6460
\Magento\Backend\Block\Widget\Button::class
6561
)->setData(
66-
['label' => __('Submit Comment'), 'class' => 'action-save action-secondary', 'onclick' => $onclick]
62+
['label' => __('Update'), 'class' => 'action-save action-secondary', 'onclick' => $onclick]
6763
);
6864
$this->setChild('submit_button', $button);
6965
return parent::_prepareLayout();

app/code/Magento/Sales/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,3 +820,4 @@ If set YES Email field will be required during Admin order creation for new Cust
820820
"Logo for PDF Print-outs","Logo for PDF Print-outs"
821821
"Please provide a comment text or update the order status to be able to submit a comment for this order.", "Please provide a comment text or update the order status to be able to submit a comment for this order."
822822
"A status change or comment text is required to submit a comment.", "A status change or comment text is required to submit a comment."
823+
"Update","Update"
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
/************************************************************************
3+
*
4+
* Copyright 2024 Adobe
5+
* All Rights Reserved.
6+
*
7+
* NOTICE: All information contained herein is, and remains
8+
* the property of Adobe and its suppliers, if any. The intellectual
9+
* and technical concepts contained herein are proprietary to Adobe
10+
* and its suppliers and are protected by all applicable intellectual
11+
* property laws, including trade secret and copyright laws.
12+
* Dissemination of this information or reproduction of this material
13+
* is strictly forbidden unless prior written permission is obtained
14+
* from Adobe.
15+
* ************************************************************************
16+
*/
17+
declare(strict_types=1);
18+
19+
namespace Magento\Sales\Controller\Adminhtml\Order;
20+
21+
use Magento\Framework\Exception\LocalizedException;
22+
use Magento\Sales\Api\Data\OrderInterfaceFactory;
23+
use Magento\TestFramework\TestCase\AbstractBackendController;
24+
25+
class ViewCommentTest extends AbstractBackendController
26+
{
27+
/** @var OrderInterfaceFactory */
28+
private $orderFactory;
29+
30+
/**
31+
* @inheritdoc
32+
*/
33+
protected function setUp(): void
34+
{
35+
parent::setUp();
36+
$this->orderFactory = $this->_objectManager->get(OrderInterfaceFactory::class);
37+
}
38+
39+
/**
40+
* Verify the button Label is rendered as 'Update Changes' in order comment section
41+
* of order details page.
42+
*
43+
* @magentoDataFixture Magento/Sales/_files/order.php
44+
* @magentoAppArea adminhtml
45+
* @return void
46+
* @throws LocalizedException
47+
*/
48+
public function testVerifyStatusCommentUpdateButtonLabel(): void
49+
{
50+
$order = $this->orderFactory->create()->loadByIncrementId('100000001');
51+
$this->getRequest()->setParam('order_id', $order->getEntityId());
52+
$this->dispatch('backend/sales/order/view/');
53+
$content = $this->getResponse()->getBody();
54+
$this->assertStringContainsString(
55+
'<span>Update</span>',
56+
$content
57+
);
58+
}
59+
}

0 commit comments

Comments
 (0)