9 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
12 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
33 public function processAssert(
34 SalesOrderView $salesOrderView,
35 OrderIndex $salesOrder,
39 $capturedPrices =
$order->getPrice()[
'captured_prices'];
41 $salesOrder->getSalesOrderGrid()->searchAndOpen([
'id' => $orderId]);
44 $infoTab = $salesOrderView->getOrderForm()->openTab(
'info')->getTab(
'info');
45 $comments = $infoTab->getCommentsHistoryBlock()->getComments();
48 if (strstr($comment[
'comment'],
'Captured') ===
false) {
54 foreach ($capturedPrices as $key => $capturedPrice) {
55 \PHPUnit\Framework\Assert::assertRegExp(
56 sprintf(self::CAPTURED_AMOUNT_PATTERN, preg_quote(number_format($capturedPrice, 2,
'.',
''))),
58 'Incorrect captured amount value for the order #' . $orderId
70 return "Message about captured amount is available in Comments History section.";