9 use Magento\Mtf\Constraint\AbstractConstraint;
12 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
13 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
29 public function processAssert(
30 SalesOrderView $salesOrderView,
31 OrderIndex $orderIndex,
36 $orderIndex->getSalesOrderGrid()->searchAndOpen([
'id' =>
$order->getId()]);
37 $salesOrderView->getOrderForm()->openTab(
'invoices');
39 $grid = $salesOrderView->getOrderInvoiceGrid();
41 foreach ($ids[
'invoiceIds'] as $key => $invoiceId) {
44 'grand_total_from' =>
$amount[$key][
'grand_invoice_total'],
45 'grand_total_to' =>
$amount[$key][
'grand_invoice_total'],
47 $grid->search($filter);
48 $filter[
'amount_from'] = number_format(
$amount[$key][
'grand_invoice_total'], 2);
49 unset($filter[
'amount_to']);
50 \PHPUnit\Framework\Assert::assertTrue(
51 $grid->isRowVisible($filter,
false,
false),
52 'Invoice is absent on invoices tab.' 64 return 'Invoice is present on invoices tab.';