コード例 #1
0
 /**
  * Assert that order is present in Orders grid on frontend
  *
  * @param Order $order
  * @param Customer $customer
  * @param CustomerAccountIndex $customerAccountIndex
  * @param OrderHistory $orderHistory
  * @return void
  */
 public function processAssert(Order $order, Customer $customer, CustomerAccountIndex $customerAccountIndex, OrderHistory $orderHistory)
 {
     $this->objectManager->create('Mage\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $customerAccountIndex->getAccountNavigationBlock()->openNavigationItem('My Orders');
     \PHPUnit_Framework_Assert::assertTrue($orderHistory->getOrderHistoryBlock()->isOrderVisible($order), "Order with following id {$order->getId()} is absent in Orders block on frontend.");
 }
コード例 #2
0
 /**
  * Open entity tab.
  *
  * @param string $orderId
  * @param string $entityType
  * @return void
  */
 public function openEntityTab($orderId, $entityType)
 {
     $this->orderHistory->getOrderHistoryBlock()->openOrderById($orderId);
     $this->customerOrderView->getOrderViewBlock()->openLinkByName(ucfirst($entityType) . 's');
 }
 /**
  * Open order page.
  *
  * @param OrderHistory $orderHistory
  * @param string $orderId
  */
 protected function openOrderPage(OrderHistory $orderHistory, $orderId)
 {
     $orderHistory->open();
     $orderHistory->getOrderHistoryBlock()->openOrderById($orderId);
 }