Example #1
0
 /**
  * Fill form with tabs.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return FormSections
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     if ($fixture->hasData('store_id')) {
         $store = $fixture->getStoreId();
         $storeSwitcherBlock = $this->browser->find($this->storeSwitcherBlock);
         $storeSwitcherBlock->find($this->dropdownBlock, Locator::SELECTOR_CSS, 'liselectstore')->setValue($store);
         $modalElement = $this->browser->find($this->confirmModal);
         /** @var \Magento\Ui\Test\Block\Adminhtml\Modal $modal */
         $modal = $this->blockFactory->create('Magento\\Ui\\Test\\Block\\Adminhtml\\Modal', ['element' => $modalElement]);
         $modal->acceptAlert();
     }
     return parent::fill($fixture, $element);
 }