示例#1
0
 /**
  * Check if ordered product is in grid
  *
  * @param CatalogProductSimple $product
  * @return bool
  */
 public function isProductVisible(CatalogProductSimple $product)
 {
     $filter = [$product->getName(), $product->getPrice(), $product->getCheckoutData()['qty']];
     $rows = [];
     foreach ($filter as $value) {
         $rows[] = sprintf($this->rowTemplate, $value);
     }
     $location = $this->location . '[' . implode(' and ', $rows) . ']';
     return $this->_rootElement->find($location, Locator::SELECTOR_XPATH)->isVisible();
 }