8 use Magento\Mtf\Constraint\AbstractConstraint;
9 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
10 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
23 private static $message =
'Approved the payment online.';
33 public function processAssert(SalesOrderView $salesOrderView, OrderIndex $orderIndex, $orderId)
36 $orderIndex->getSalesOrderGrid()->searchAndOpen([
'id' => $orderId]);
39 $infoTab = $salesOrderView->getOrderForm()->openTab(
'info')->getTab(
'info');
40 $latestComment = $infoTab->getCommentsHistoryBlock()->getLatestComment();
42 \PHPUnit\Framework\Assert::assertContains(
self::$message, $latestComment[
'comment']);
52 return 'Message about approved payment is available in Comments History section.';