コード例 #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
ファイル: CustomerForm.php プロジェクト: aiesh/magento2
 /**
  * Update Customer forms on tabs by customer, addresses data
  *
  * @param FixtureInterface $customer
  * @param FixtureInterface|FixtureInterface[]|null $address
  * @return $this
  */
 public function updateCustomer(FixtureInterface $customer, $address = null)
 {
     $isHasData = $customer instanceof InjectableFixture ? $customer->hasData() : true;
     if ($isHasData) {
         parent::fill($customer);
     }
     if (null !== $address) {
         $this->openTab('addresses');
         $this->getTabElement('addresses')->updateAddresses($address);
     }
     return $this;
 }
コード例 #3
0
 /**
  * Update Customer forms on tabs by customer, addresses data.
  *
  * @param FixtureInterface $customer
  * @param FixtureInterface|FixtureInterface[]|null $address
  * @param Address|null $addressToDelete
  * @return $this
  */
 public function updateCustomer(FixtureInterface $customer, $address = null, Address $addressToDelete = null)
 {
     $this->waitForm();
     $isHasData = $customer instanceof InjectableFixture ? $customer->hasData() : true;
     if ($isHasData) {
         parent::fill($customer);
     }
     if ($addressToDelete !== null) {
         $this->openTab('addresses');
         $this->getTab('addresses')->deleteCustomerAddress($addressToDelete);
     }
     if ($address !== null) {
         $this->openTab('addresses');
         $this->getTab('addresses')->updateAddresses($address);
     }
     return $this;
 }
コード例 #4
0
ファイル: ProductForm.php プロジェクト: Atlis/docker-magento2
 /**
  * Fill the product form
  *
  * @param FixtureInterface $fixture
  * @param CatalogCategory $category
  * @param Element $element
  * @return $this
  */
 public function fillProduct(FixtureInterface $fixture, CatalogCategory $category = null, Element $element = null)
 {
     $this->category = $category;
     $this->fillCategory($fixture);
     if ($fixture instanceof InjectableFixture) {
         $status = $fixture->getStatus();
         if ($status === 'Product offline' && $this->_rootElement->find(sprintf($this->onlineSwitcher, ':checked'))->isVisible() || $status === 'Product online' && $this->_rootElement->find(sprintf($this->onlineSwitcher, ':not(:checked)'))->isVisible()) {
             $this->_rootElement->find(sprintf($this->onlineSwitcher, ''))->click();
         }
     }
     return parent::fill($fixture, $element);
 }
コード例 #5
0
ファイル: ProductForm.php プロジェクト: aiesh/magento2
 /**
  * Fill the product form
  *
  * @param FixtureInterface $fixture
  * @param Element $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, Element $element = null)
 {
     $this->fillCategory($fixture);
     return parent::fill($fixture);
 }