Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateSearchTermEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchEdit;
11 use Magento\CatalogSearch\Test\Page\Adminhtml\CatalogSearchIndex;
12 use Magento\Mtf\TestCase\Injectable;
13 
29 class CreateSearchTermEntityTest extends Injectable
30 {
31  /* tags */
32  const MVP = 'yes';
33  /* end tags */
34 
40  protected $indexPage;
41 
47  protected $editPage;
48 
56  public function __inject(CatalogSearchIndex $indexPage, CatalogSearchEdit $editPage)
57  {
58  $this->indexPage = $indexPage;
59  $this->editPage = $editPage;
60  }
61 
68  public function test(CatalogSearchQuery $searchTerm)
69  {
70  // Steps
71  $this->indexPage->open();
72  $this->indexPage->getGridPageActions()->addNew();
73  $this->editPage->getForm()->fill($searchTerm);
74  $this->editPage->getFormPageActions()->save();
75  }
76 }
__inject(CatalogSearchIndex $indexPage, CatalogSearchEdit $editPage)