Skip to content

Commit 88e04f1

Browse files
author
Roman Lytvynenko
committed
Merge branch 'MC-35930' of https://github.com/magento-chaika/magento2ce into TANGO-PR-07-29-2020_23
2 parents 4804cdf + f1f898d commit 88e04f1

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/**
1212
* Class AddComment
13+
*
14+
* Controller responsible for addition of the order comment to the order
1315
*/
1416
class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements HttpPostActionInterface
1517
{
@@ -42,6 +44,7 @@ public function execute()
4244
);
4345
}
4446

47+
$order->setStatus($data['status']);
4548
$notify = $data['is_customer_notified'] ?? false;
4649
$visible = $data['is_visible_on_front'] ?? false;
4750

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Config
5252
*/
5353
protected $maskStatusesMapping = [
5454
\Magento\Framework\App\Area::AREA_FRONTEND => [
55-
\Magento\Sales\Model\Order::STATUS_FRAUD => \Magento\Sales\Model\Order::STATE_PROCESSING,
55+
\Magento\Sales\Model\Order::STATUS_FRAUD => \Magento\Sales\Model\Order::STATUS_FRAUD,
5656
\Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW => \Magento\Sales\Model\Order::STATE_PROCESSING
5757
]
5858
];

dev/tests/integration/testsuite/Magento/Sales/Model/Order/ConfigTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,28 @@ public function testCorrectCompleteStatusInStatesList()
5050

5151
$this->assertEquals($completeStatus->getLabel(), $completeState->getText());
5252
}
53+
54+
/**
55+
* Test Mask Status For Area
56+
*
57+
* @param string $code
58+
* @param string $expected
59+
* @dataProvider dataProviderForTestMaskStatusForArea
60+
*/
61+
public function testMaskStatusForArea(string $code, string $expected)
62+
{
63+
$result = $this->orderConfig->getStatusFrontendLabel($code);
64+
$this->assertEquals($expected, $result);
65+
}
66+
67+
/**
68+
* @return array
69+
*/
70+
public function dataProviderForTestMaskStatusForArea()
71+
{
72+
return [
73+
['fraud', 'Suspected Fraud'],
74+
['processing', 'Processing'],
75+
];
76+
}
5377
}

0 commit comments

Comments
 (0)