From f843e387e5ab8b8c38cce6547ed9cd3017b66bbe Mon Sep 17 00:00:00 2001 From: Sarmistha Date: Mon, 22 Jan 2024 13:56:58 +0530 Subject: [PATCH 1/3] ACP2E-2709: [Feature Request] Customer suggests that Submit Comment Button on Order Details page is confusing and should be changed to something else --- app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php index 10b80b6f4e527..23621c7e082ae 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php @@ -63,7 +63,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 Changes'), 'class' => 'action-save action-secondary', 'onclick' => $onclick] ); $this->setChild('submit_button', $button); return parent::_prepareLayout(); From c203b8ad8319140c2a17afdbc9c84ae1a5849f72 Mon Sep 17 00:00:00 2001 From: Sarmistha Date: Mon, 22 Jan 2024 18:49:40 +0530 Subject: [PATCH 2/3] ACP2E-2709: [Feature Request] Customer suggests that Submit Comment Button on Order Details page is confusing and should be changed to something else --- .../Block/Adminhtml/Order/View/History.php | 4 -- .../Adminhtml/Order/ViewCommentTest.php | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php index 23621c7e082ae..8aef55f4fe415 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php @@ -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; diff --git a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php new file mode 100644 index 0000000000000..082f246818112 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php @@ -0,0 +1,59 @@ +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( + 'Update Changes', + $content + ); + } +} From bc75e476dd342fb156b287d2d74aa59364cb5bd8 Mon Sep 17 00:00:00 2001 From: Sarmistha Date: Wed, 24 Jan 2024 11:43:56 +0530 Subject: [PATCH 3/3] ACP2E-2709: [Feature Request] Customer suggests that Submit Comment Button on Order Details page is confusing and should be changed to something else --- app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php | 2 +- app/code/Magento/Sales/i18n/en_US.csv | 1 + .../Sales/Controller/Adminhtml/Order/ViewCommentTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php index 8aef55f4fe415..48278a8babc40 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php @@ -59,7 +59,7 @@ protected function _prepareLayout() $button = $this->getLayout()->createBlock( \Magento\Backend\Block\Widget\Button::class )->setData( - ['label' => __('Update Changes'), 'class' => 'action-save action-secondary', 'onclick' => $onclick] + ['label' => __('Update'), 'class' => 'action-save action-secondary', 'onclick' => $onclick] ); $this->setChild('submit_button', $button); return parent::_prepareLayout(); diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index 6b22ae7565665..58d6d0cc2f831 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -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" diff --git a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php index 082f246818112..286d3f677237d 100644 --- a/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php +++ b/dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/ViewCommentTest.php @@ -52,7 +52,7 @@ public function testVerifyStatusCommentUpdateButtonLabel(): void $this->dispatch('backend/sales/order/view/'); $content = $this->getResponse()->getBody(); $this->assertStringContainsString( - 'Update Changes', + 'Update', $content ); }