/**
  * Run create search term test.
  *
  * @param CatalogSearchQuery $searchTerm
  * @return void
  */
 public function test(CatalogSearchQuery $searchTerm)
 {
     // Steps
     $this->indexPage->open();
     $this->indexPage->getGridPageActions()->addNew();
     $this->editPage->getForm()->fill($searchTerm);
     $this->editPage->getFormPageActions()->save();
 }
Пример #2
0
 /**
  * Run edit search term test
  *
  * @param CatalogSearchQuery $searchTerm
  * @return void
  */
 public function test(CatalogSearchQuery $searchTerm)
 {
     // Preconditions
     $searchText = $searchTerm->getQueryText();
     // Steps
     $this->cmsIndex->open()->getSearchBlock()->search($searchText);
     $this->indexPage->open()->getGrid()->searchAndOpen(['search_query' => $searchText]);
     $this->editPage->getForm()->fill($searchTerm);
     $this->editPage->getFormPageActions()->save();
 }
 /**
  * Assert that after save a search term on edit term search page displays:
  *  - correct Search Query field passed from fixture
  *  - correct Store
  *  - correct Number of results
  *  - correct Number of Uses
  *  - correct Synonym For
  *  - correct Redirect URL
  *  - correct Display in Suggested Terms
  *
  * @param CatalogSearchIndex $indexPage
  * @param CatalogSearchEdit $editPage
  * @param CatalogSearchQuery $searchTerm
  * @return void
  */
 public function processAssert(CatalogSearchIndex $indexPage, CatalogSearchEdit $editPage, CatalogSearchQuery $searchTerm)
 {
     $indexPage->open()->getGrid()->searchAndOpen(['search_query' => $searchTerm->getQueryText()]);
     $formData = $editPage->getForm()->getData($searchTerm);
     $fixtureData = $searchTerm->getData();
     \PHPUnit_Framework_Assert::assertEquals($formData, $fixtureData, 'This form "Search Term" does not match the fixture data.');
 }
 /**
  * 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);
 }
Пример #5
0
 /**
  * Run create search term test
  *
  * @param CatalogSearchQuery $searchTerm
  * @return void
  */
 public function test(CatalogSearchQuery $searchTerm)
 {
     $this->markTestIncomplete('MAGETWO-26170');
     // Steps
     $this->indexPage->open();
     $this->indexPage->getGridPageActions()->addNew();
     $this->editPage->getForm()->fill($searchTerm);
     $this->editPage->getFormPageActions()->save();
 }