8 use Magento\Mtf\Constraint\AbstractConstraint;
9 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
10 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
21 private $historyComment =
'Awaiting the Signifyd guarantee disposition.';
26 private $historyCommentStatus =
'On Hold';
34 public function processAssert(
35 SalesOrderView $salesOrderView,
36 OrderIndex $salesOrder,
40 $salesOrder->getSalesOrderGrid()->searchAndOpen([
'id' => $orderId]);
43 $infoTab = $salesOrderView->getOrderForm()->openTab(
'info')->getTab(
'info');
44 $orderComments = $infoTab->getCommentsHistoryBlock()->getComments();
47 $this->historyComment,
48 array_column($orderComments,
'comment')
51 \PHPUnit\Framework\Assert::assertNotFalse(
53 'There is no message about awaiting the Signifyd guarantee disposition' .
54 ' in Comments History section for the order #' . $orderId
57 \PHPUnit\Framework\Assert::assertEquals(
58 $this->historyCommentStatus,
59 $orderComments[$key][
'status'],
60 'Message about awaiting the Signifyd guarantee disposition' .
61 ' doesn\'t have status "'. $this->historyCommentStatus.
'"' .
62 ' in Comments History section for the order #' . $orderId
71 return "Message about awaiting the Signifyd guarantee disposition is available in Comments History section.";