Skip to content

Commit c203b8a

Browse files
SarmisthaSarmistha
authored andcommitted
ACP2E-2709: [Feature Request] Customer suggests that Submit Comment Button on Order Details page is confusing and should be changed to something else
1 parent f843e38 commit c203b8a

File tree

2 files changed

+59
-4
lines changed
  • app/code/Magento/Sales/Block/Adminhtml/Order/View
  • dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order

2 files changed

+59
-4
lines changed

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

Lines changed: 0 additions & 4 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;
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 Changes</span>',
56+
$content
57+
);
58+
}
59+
}

0 commit comments

Comments
 (0)