/**
  * Assert that Search Term Report form data equals to passed from dataSet
  *
  * @param CatalogSearchEdit $catalogSearchEdit
  * @param SearchIndex $searchIndex
  * @param string $productName
  * @param int $countProducts
  * @param int $countSearch
  * @return void
  */
 public function processAssert(CatalogSearchEdit $catalogSearchEdit, SearchIndex $searchIndex, $productName, $countProducts, $countSearch)
 {
     $filter = ['query_text' => $productName, 'num_results' => $countProducts, 'popularity' => $countSearch];
     $searchIndex->open();
     $searchIndex->getSearchGrid()->searchAndOpen($filter);
     $dataDiff = $this->verifyData($filter, $catalogSearchEdit->getForm()->getData());
     \PHPUnit_Framework_Assert::assertEmpty($dataDiff, $dataDiff);
 }
 /**
  * Search Terms Report.
  *
  * @param string $product
  * @param int $countProducts
  * @param int $countSearch
  * @return array
  */
 public function test($product, $countProducts, $countSearch)
 {
     // Preconditions
     $productName = $this->createProducts($product, $countProducts);
     // Steps
     $this->cmsIndex->open();
     $this->searchProducts($productName, $countSearch);
     $this->searchIndex->open();
     return ['productName' => $productName];
 }
 /**
  * Search Terms Report
  *
  * @param CatalogProductSimple $product
  * @param int $countProducts
  * @param int $countSearch
  * @return array
  */
 public function test(CatalogProductSimple $product, $countProducts, $countSearch)
 {
     $this->markTestIncomplete('MAGETWO-27150, MAGETWO-27151');
     // Preconditions
     $productName = $this->createProducts($product, $countProducts);
     // Steps
     $this->cmsIndex->open();
     $this->searchProducts($productName, $countSearch);
     $this->searchIndex->open();
     return ['productName' => $productName];
 }
 /**
  * Assert that Search Terms report in grid
  *
  * @param SearchIndex $searchIndex
  * @param string $productName
  * @param int $countProducts
  * @param int $countSearch
  * @return void
  */
 public function processAssert(SearchIndex $searchIndex, $productName, $countProducts, $countSearch)
 {
     $filter = ['query_text' => $productName, 'num_results' => $countProducts, 'popularity' => $countSearch];
     \PHPUnit_Framework_Assert::assertTrue($searchIndex->getSearchGrid()->isRowVisible($filter), 'Search terms report is absent in Search Terms grid.');
 }