/**
  * Assert shipment with corresponding shipment/order ID is present in 'Shipments' with correct total qty field
  *
  * @param ShipmentIndex $shipmentIndex
  * @param OrderInjectable $order
  * @param array $ids
  * @return void
  */
 public function processAssert(ShipmentIndex $shipmentIndex, OrderInjectable $order, array $ids)
 {
     $shipmentIndex->open();
     $orderId = $order->getId();
     $totalQty = $order->getTotalQtyOrdered();
     foreach ($ids['shipmentIds'] as $key => $shipmentIds) {
         $filter = ['id' => $shipmentIds, 'order_id' => $orderId, 'total_qty_from' => $totalQty[$key], 'total_qty_to' => $totalQty[$key]];
         \PHPUnit_Framework_Assert::assertTrue($shipmentIndex->getShipmentsGrid()->isRowVisible($filter), 'Shipment is absent in shipment grid on shipment index page.');
     }
 }
 /**
  * Assert that shipment is present in the shipments grid
  *
  * @param ShipmentIndex $shipmentIndex
  * @param array         $ids
  *
  * @return void
  */
 public function processAssert(ShipmentIndex $shipmentIndex, array $ids)
 {
     foreach ($ids as $orderId => $shipmentIds) {
         $shipmentIndex->open();
         $grid = $shipmentIndex->getShipmentsGrid();
         foreach ($shipmentIds as $shipmentId) {
             $filter = ['id' => $shipmentId, 'order_id' => $orderId];
             $grid->search($filter);
             \PHPUnit_Framework_Assert::assertTrue($grid->isRowVisible($filter, false, true), 'Shipment is absent on shipments grid.');
         }
     }
 }
 /**
  * Assert shipped products are represented on shipment view page.
  *
  * @param SalesShipmentView $orderShipmentView
  * @param OrderInjectable $order
  * @param array $ids
  * @param array|null $data [optional]
  * @return void
  */
 public function processAssert(SalesShipmentView $orderShipmentView, OrderInjectable $order, array $ids, array $data = null)
 {
     $this->shipmentPage->open();
     $this->assert($order, $ids, $orderShipmentView, $data);
 }