Skip to content

Commit

Permalink
Merge remote-tracking branch 'magento-l3/ACP2E-2709' into Tier4-Kings…
Browse files Browse the repository at this point in the history
…-PR-03-21-2024
  • Loading branch information
lakshmana49 committed Mar 21, 2024
2 parents a98a64a + cb8e7c5 commit 879d80e
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@
class History extends \Magento\Backend\Block\Template
{
/**
* Core registry
*
* @var \Magento\Framework\Registry
*/
protected $_coreRegistry = null;

/**
* Sales data
*
* @var \Magento\Sales\Helper\Data
*/
protected $_salesData = null;
Expand Down Expand Up @@ -63,7 +59,7 @@ protected function _prepareLayout()
$button = $this->getLayout()->createBlock(
\Magento\Backend\Block\Widget\Button::class
)->setData(
['label' => __('Submit Comment'), 'class' => 'action-save action-secondary', 'onclick' => $onclick]
['label' => __('Update'), 'class' => 'action-save action-secondary', 'onclick' => $onclick]
);
$this->setChild('submit_button', $button);
return parent::_prepareLayout();
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Sales/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -820,3 +820,4 @@ If set YES Email field will be required during Admin order creation for new Cust
"Logo for PDF Print-outs","Logo for PDF Print-outs"
"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."
"A status change or comment text is required to submit a comment.", "A status change or comment text is required to submit a comment."
"Update","Update"
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php
/************************************************************************
*
* Copyright 2024 Adobe
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe and its suppliers, if any. The intellectual
* and technical concepts contained herein are proprietary to Adobe
* and its suppliers and are protected by all applicable intellectual
* property laws, including trade secret and copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
* ************************************************************************
*/
declare(strict_types=1);

namespace Magento\Sales\Controller\Adminhtml\Order;

use Magento\Framework\Exception\LocalizedException;
use Magento\Sales\Api\Data\OrderInterfaceFactory;
use Magento\TestFramework\TestCase\AbstractBackendController;

class ViewCommentTest extends AbstractBackendController
{
/** @var OrderInterfaceFactory */
private $orderFactory;

/**
* @inheritdoc
*/
protected function setUp(): void
{
parent::setUp();
$this->orderFactory = $this->_objectManager->get(OrderInterfaceFactory::class);
}

/**
* Verify the button Label is rendered as 'Update Changes' in order comment section
* of order details page.
*
* @magentoDataFixture Magento/Sales/_files/order.php
* @magentoAppArea adminhtml
* @return void
* @throws LocalizedException
*/
public function testVerifyStatusCommentUpdateButtonLabel(): void
{
$order = $this->orderFactory->create()->loadByIncrementId('100000001');
$this->getRequest()->setParam('order_id', $order->getEntityId());
$this->dispatch('backend/sales/order/view/');
$content = $this->getResponse()->getBody();
$this->assertStringContainsString(
'<span>Update</span>',
$content
);
}
}

0 comments on commit 879d80e

Please sign in to comment.