9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
11 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
32 public function processAssert(
33 SalesOrderView $salesOrderView,
34 OrderIndex $salesOrder,
39 $salesOrder->getSalesOrderGrid()->searchAndOpen([
'id' => $orderId]);
42 $infoTab = $salesOrderView->getOrderForm()->openTab(
'info')->getTab(
'info');
43 $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
44 $commentsMessages = array_column($orderComments,
'comment');
46 \PHPUnit\Framework\Assert::assertRegExp(
47 sprintf(self::AUTHORIZED_AMOUNT_PATTERN,
$prices[
'grandTotal']),
48 implode(
'. ', $commentsMessages),
49 'Incorrect authorized amount value for the order #' . $orderId
60 return "Message about authorized amount is available in Comments History section.";