Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateCustomVariableEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Variable\Test\Fixture\SystemVariable;
10 use Magento\Variable\Test\Page\Adminhtml\SystemVariableIndex;
11 use Magento\Variable\Test\Page\Adminhtml\SystemVariableNew;
12 use Magento\Mtf\TestCase\Injectable;
13 
26 class CreateCustomVariableEntityTest extends Injectable
27 {
28  /* tags */
29  const MVP = 'yes';
30  const TEST_TYPE = 'extended_acceptance_test';
31  /* end tags */
32 
39 
46 
54  public function __inject(
55  SystemVariableIndex $systemVariableIndex,
56  SystemVariableNew $systemVariableNew
57  ) {
58  $this->systemVariableIndexPage = $systemVariableIndex;
59  $this->systemVariableNewPage = $systemVariableNew;
60  }
61 
68  public function test(SystemVariable $customVariable)
69  {
70  // Steps
71  $this->systemVariableIndexPage->open();
72  $this->systemVariableIndexPage->getGridPageActions()->addNew();
73  $this->systemVariableNewPage->getSystemVariableForm()->fill($customVariable);
74  $this->systemVariableNewPage->getFormPageActions()->save();
75  }
76 }
__inject(SystemVariableIndex $systemVariableIndex, SystemVariableNew $systemVariableNew)