Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UpdateStoreGroupEntityTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\EditGroup;
10 use Magento\Backend\Test\Page\Adminhtml\StoreIndex;
12 use Magento\Mtf\TestCase\Injectable;
13 
33 class UpdateStoreGroupEntityTest extends Injectable
34 {
35  /* tags */
36  const MVP = 'yes';
37  const SEVERITY = 'S2';
38  /* end tags */
39 
45  protected $storeIndex;
46 
52  protected $editGroup;
53 
61  public function __inject(
62  StoreIndex $storeIndex,
63  EditGroup $editGroup
64  ) {
65  $this->storeIndex = $storeIndex;
66  $this->editGroup = $editGroup;
67  }
68 
77  public function test(StoreGroup $storeGroupOrigin, StoreGroup $storeGroup, $acceptAlert)
78  {
79 
80  //Preconditions
81  $storeGroupOrigin->persist();
82 
83  //Steps
84  $this->storeIndex->open();
85  $this->storeIndex->getStoreGrid()->searchAndOpenStoreGroup($storeGroupOrigin);
86  $this->editGroup->getEditFormGroup()->fill($storeGroup);
87  $this->editGroup->getFormPageActions()->save();
88  if ($acceptAlert) {
89  $this->editGroup->getModalBlock()->acceptAlert();
90  }
91  }
92 }
__inject(StoreIndex $storeIndex, EditGroup $editGroup)
test(StoreGroup $storeGroupOrigin, StoreGroup $storeGroup, $acceptAlert)