8 use Magento\Mtf\Constraint\AbstractConstraint;
9 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
10 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
21 private $guaranteeCancelMessage =
'Case Update: Case guarantee has been cancelled.';
29 public function processAssert(
30 SalesOrderView $salesOrderView,
31 OrderIndex $salesOrder,
35 $salesOrder->getSalesOrderGrid()->searchAndOpen([
'id' => $orderId]);
38 $infoTab = $salesOrderView->getOrderForm()->openTab(
'info')->getTab(
'info');
39 $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
40 $commentsMessages = array_column($orderComments,
'comment');
42 \PHPUnit\Framework\Assert::assertContains(
43 $this->guaranteeCancelMessage,
44 implode(
'. ', $commentsMessages),
45 'There is no message regarding Signifyd guarantee cancel in Comments History section for the order #' 55 return "Message about Signifyd guarantee cancel is available in Comments History section.";