Пример #1
0
 /**
  * Fill the attribute form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $browser = $this->browser;
     $selector = $this->saveButton;
     $this->browser->waitUntil(function () use($browser, $selector) {
         return $browser->find($selector)->isVisible() ? true : null;
     });
     parent::fill($fixture, $element);
 }
Пример #2
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);
 }
 /**
  * Open section or click on button to open modal window.
  *
  * @param string $sectionName
  * @return $this
  */
 public function openSection($sectionName)
 {
     $sectionElement = $this->getContainerElement($sectionName);
     if ($sectionElement->getAttribute('type') == 'button') {
         $sectionElement->click();
     } else {
         parent::openSection($sectionName);
     }
     return $this;
 }