/** * 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); }
/** * Get data of Customer information, addresses on tabs. * * @param FixtureInterface $customer * @param FixtureInterface|FixtureInterface[]|null $address * @return array */ public function getDataCustomer(FixtureInterface $customer, $address = null) { $data = ['customer' => $customer->hasData() ? parent::getData($customer) : parent::getData()]; if (null !== $address) { $this->openTab('addresses'); $data['addresses'] = $this->getTabElement('addresses')->getDataAddresses($address); } return $data; }
/** * Open tab. * * @param string $tabName * @return Tab */ public function openTab($tabName) { if (!$this->isTabVisible($tabName)) { $this->showAdvancedSettings(); } return parent::openTab($tabName); }
/** * Open tab. * * @param string $tabName * @return Tab */ public function openTab($tabName) { $this->browser->find($this->pageTitle)->click(); // Handle menu overlap problem return parent::openTab($tabName); }
/** * Open tab. * * @param string $tabName * @return CustomerForm */ public function openTab($tabName) { parent::openTab($tabName); $this->waitForElementNotVisible($this->tabReadiness); return $this; }
/** * Open tab. * * @param string $tabName * @return Tab */ public function openTab($tabName) { $this->showAdvancedSettings(); return parent::openTab($tabName); }
/** * Get data of the tabs * * @param FixtureInterface|null $fixture * @param Element|null $element * @return array */ public function getData(FixtureInterface $fixture = null, Element $element = null) { $data = parent::getData($fixture); if ($fixture->hasData('status')) { $data['status'] = 'Product offline'; if ($this->_rootElement->find(sprintf($this->onlineSwitcher, ':checked'))->isVisible()) { $data['status'] = 'Product online'; } } return $data; }
/** * Get data of the tabs * * @param FixtureInterface|null $fixture * @param Element|null $element * @return array */ public function getData(FixtureInterface $fixture = null, Element $element = null) { $this->showAdvancedSettings(); return parent::getData($fixture, $element); }
/** * Save product * * @param FixtureInterface $fixture * @return \Magento\Backend\Test\Block\Widget\Form|void */ public function save(FixtureInterface $fixture = null) { parent::save($fixture); if ($this->getAffectedAttributeSetBlock()->isVisible()) { $this->getAffectedAttributeSetBlock()->chooseAttributeSet($fixture); } }