Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateSynonymGroupEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Search\Test\Page\Adminhtml\SynonymGroupIndex;
10 use Magento\Search\Test\Page\Adminhtml\SynonymGroupNew;
11 use Magento\Mtf\TestCase\Injectable;
13 
28 class CreateSynonymGroupEntityTest extends Injectable
29 {
30  /* tags */
31  const MVP = 'yes';
32  const TEST_TYPE = 'extended_acceptance_test';
33  /* end tags */
34 
40  protected $synonymGroupIndex;
41 
47  protected $synonymGroupNew;
48 
56  public function __inject(
57  SynonymGroupIndex $synonymGroupIndex,
58  SynonymGroupNew $synonymGroupNew
59  ) {
60  $this->synonymGroupIndex = $synonymGroupIndex;
61  $this->synonymGroupNew = $synonymGroupNew;
62  }
63 
70  public function test(SynonymGroup $synonymGroup)
71  {
72  // Steps
73  $this->synonymGroupIndex->open();
74  $this->synonymGroupIndex->getGridPageActions()->addNew();
75  $this->synonymGroupNew->getSynonymGroupForm()->fill($synonymGroup);
76  $this->synonymGroupNew->getFormPageActions()->save();
77  }
78 }
__inject(SynonymGroupIndex $synonymGroupIndex, SynonymGroupNew $synonymGroupNew)