예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function clickPayButtonForGivenPayment(PaymentInterface $payment)
 {
     $table = $this->getElement('table');
     $row = $this->tableAccessor->getRowWithFields($this->getElement('table'), ['#' => $payment->getId()]);
     $actions = $this->tableAccessor->getFieldFromRow($table, $row, 'Action');
     $actions->clickLink('Pay');
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function isThereProduct(ProductInterface $product)
 {
     if (!($table = $this->getDocument()->find('css', 'table'))) {
         return false;
     }
     $row = $this->tableAccessor->getRowWithFields($table, ['id' => $product->getId()]);
     return null === $row;
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function hasItemWithProductAndQuantity($productName, $quantity)
 {
     $table = $this->getElement('items_table');
     try {
         $this->tableAccessor->getRowWithFields($table, ['item' => $productName, 'qty' => $quantity]);
     } catch (\InvalidArgumentException $exception) {
         return false;
     }
     return true;
 }
예제 #4
0
 /**
  * {@inheritdoc}
  */
 public function isThereShippingMethodNamed($name)
 {
     if (null === ($table = $this->getDocument()->find('css', 'table'))) {
         return false;
     }
     try {
         $row = $this->tableAccessor->getRowWithFields($table, ['name' => $name]);
     } catch (\InvalidArgumentException $exception) {
         return false;
     }
     return 1 === $row;
 }
예제 #5
0
파일: IndexPage.php 프로젝트: sylius/sylius
 /**
  * {@inheritDoc}
  */
 public function isItPossibleToChangePaymentMethodForOrder(OrderInterface $order)
 {
     $row = $this->tableAccessor->getRowWithFields($this->getElement('customer_orders'), ['number' => $order->getNumber()]);
     return $row->hasLink('Pay');
 }
예제 #6
0
 /**
  * {@inheritdoc}
  */
 public function getUsedThemeName($channelCode)
 {
     $table = $this->getDocument()->find('css', 'table');
     $row = $this->tableAccessor->getRowWithFields($table, ['code' => $channelCode]);
     return trim($this->tableAccessor->getFieldFromRow($table, $row, 'theme')->getText());
 }