Пример #1
0
 /**
  * Fill credit card.
  *
  * @param Cc $creditCard
  * @return void
  */
 public function fillCc(Cc $creditCard)
 {
     $this->waitForElementVisible($this->centinel);
     $this->browser->switchToFrame(new Locator($this->centinel));
     $element = $this->getRootElement();
     parent::fill($creditCard, $element);
 }
Пример #2
0
 /**
  * Fill the root form.
  *
  * @param FixtureInterface $review
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $review, SimpleElement $element = null)
 {
     if ($review->hasData('ratings')) {
         $this->fillRatings($review);
     }
     return parent::fill($review, $element);
 }
Пример #3
0
 /**
  * Fill the customer data
  *
  * @param FixtureInterface $customer
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $customer, SimpleElement $element = null)
 {
     /** @var Customer $customer */
     if ($customer->hasData()) {
         return parent::fill($customer, $element);
     }
 }
Пример #4
0
 /**
  * Fill currency rate form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     /** @var \Magento\Directory\Test\Fixture\CurrencyRate $fixture */
     $this->placeholders['currency_from'] = $fixture->getCurrencyFrom();
     $this->placeholders['currency_to'] = $fixture->getCurrencyTo();
     $this->applyPlaceholders();
     return parent::fill($fixture, $element);
 }
Пример #5
0
 /**
  * Initialize block. Wait popup to load.
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
     $this->waitPopupToLoad();
 }
Пример #6
0
 /**
  * Fill the page form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $this->hideEditor();
     return parent::fill($fixture, $element);
 }
Пример #7
0
 /**
  * Fill the root form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement $element
  * @return $this|void
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $this->openAdditionalSettings();
     $this->_rootElement->click();
     /** @var TaxRule $fixture */
     $this->addNewTaxRates($fixture);
     if ($fixture->hasData('tax_customer_class')) {
         $this->_rootElement->click();
         $taxCustomerBlock = $this->_rootElement->find($this->taxCustomerBlock, Locator::SELECTOR_CSS, 'multiselectlist');
         $this->waitForElementVisible(sprintf($this->taxClassMultiSelectList, 'customer'), Locator::SELECTOR_XPATH);
         $this->addNewTaxClass($fixture->getTaxCustomerClass(), $taxCustomerBlock);
     }
     if ($fixture->hasData('tax_product_class')) {
         $this->_rootElement->click();
         $taxProductBlock = $this->_rootElement->find($this->taxProductBlock, Locator::SELECTOR_CSS, 'multiselectlist');
         $this->waitForElementVisible(sprintf($this->taxClassMultiSelectList, 'product'), Locator::SELECTOR_XPATH);
         $this->addNewTaxClass($fixture->getTaxProductClass(), $taxProductBlock);
     }
     $this->_rootElement->click();
     parent::fill($fixture);
 }
Пример #8
0
 /**
  * Fill backend GiftMessage item form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     parent::fill($fixture, $element);
     $this->_rootElement->find($this->okButton)->click();
 }
Пример #9
0
 /**
  * Fill the wishlist form.
  *
  * @param Wishlist $fixture
  * @return void
  */
 public function fillWishlist(Wishlist $fixture)
 {
     parent::fill($fixture);
     $this->save();
 }
Пример #10
0
 /**
  * Ensure the form is loaded and fill the root form
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $this->waitForElementVisible($this->firstField);
     return parent::fill($fixture, $element);
 }
 /**
  * @param SimpleElement $element
  * @param BlockFactory $blockFactory
  * @param Mapper $mapper
  * @param BrowserInterface $browser
  * @param SequenceSorterInterface $sequenceSorter
  * @param FixtureFactory $fixtureFactory
  * @param array $config [optional]
  */
 public function __construct(SimpleElement $element, BlockFactory $blockFactory, Mapper $mapper, BrowserInterface $browser, SequenceSorterInterface $sequenceSorter, FixtureFactory $fixtureFactory, array $config = [])
 {
     parent::__construct($element, $blockFactory, $mapper, $browser, $sequenceSorter, $config);
     $this->fixtureFactory = $fixtureFactory;
 }
Пример #12
0
 /**
  * Fill the root form.
  *
  * @param FixtureInterface $rma
  * @param Element|null $element
  * @return $this
  */
 public function fill(FixtureInterface $rma, Element $element = null)
 {
     $this->getItemsBlock()->fill($rma);
     parent::fill($rma, $element);
     return $this;
 }
Пример #13
0
 /**
  * Get data of specified form data.
  *
  * @param array $fields
  * @param SimpleElement|null $element
  * @return array
  */
 protected function _getData(array $fields, SimpleElement $element = null)
 {
     unset($fields['code']);
     return parent::_getData($fields, $element);
 }
Пример #14
0
 /**
  * Fill form.
  *
  * @param FixtureInterface $sitemap
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $sitemap, SimpleElement $element = null)
 {
     $this->fillStoreView($sitemap);
     return parent::fill($sitemap, $element);
 }
Пример #15
0
 /**
  * Fill the root form.
  *
  * @param InjectableFixture $customer
  * @param Element|null $element
  * @return $this
  */
 public function fill(InjectableFixture $customer, Element $element = null)
 {
     $this->waitForElementNotVisible($this->loader);
     return parent::fill($customer, $element);
 }
Пример #16
0
 /**
  * Fill form data. Unset 'email' field as it absent in current form
  *
  * @param array $fields
  * @param SimpleElement $element
  * @return void
  */
 protected function _fill(array $fields, SimpleElement $element = null)
 {
     unset($fields['email']);
     parent::_fill($fields, $element);
 }
Пример #17
0
 /**
  * Fill form.
  *
  * @param FixtureInterface $checkoutAgreement
  * @param Element|null $element
  * @return $this
  */
 public function fill(FixtureInterface $checkoutAgreement, Element $element = null)
 {
     parent::fill($checkoutAgreement, $element);
     $this->fillWebsite();
     return $this;
 }
Пример #18
0
 /**
  * @constructor
  * @param Element $element
  * @param BlockFactory $blockFactory
  * @param Mapper $mapper
  * @param Browser $browser
  * @param array $config [optional]
  * @param Dashboard $dashboard
  */
 public function __construct(Element $element, BlockFactory $blockFactory, Mapper $mapper, Browser $browser, array $config = [], Dashboard $dashboard)
 {
     parent::__construct($element, $blockFactory, $mapper, $browser, $config);
     $this->dashboard = $dashboard;
 }
Пример #19
0
 /**
  * Fill the root form
  *
  * @param FixtureInterface $giftWrapping
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $giftWrapping, SimpleElement $element = null)
 {
     $this->fillWebsites($giftWrapping);
     return parent::fill($giftWrapping);
 }
Пример #20
0
 /**
  * Fill the root form.
  *
  * @param FixtureInterface $urlRewrite
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $urlRewrite, SimpleElement $element = null)
 {
     $this->fillStore($urlRewrite);
     return parent::fill($urlRewrite);
 }
Пример #21
0
 /**
  * Apply Sales rule coupon.
  *
  * @param SalesRule $salesRule
  * @return void
  */
 public function applyCouponsCode(SalesRule $salesRule)
 {
     parent::fill($salesRule);
     $this->_rootElement->find($this->applyButton, Locator::SELECTOR_XPATH)->click();
     $this->getTemplateBlock()->waitLoader();
 }
Пример #22
0
 /**
  * @constructor
  * @param SimpleElement $element
  * @param BlockFactory $blockFactory
  * @param Mapper $mapper
  * @param BrowserInterface $browser
  */
 public function __construct(SimpleElement $element, BlockFactory $blockFactory, Mapper $mapper, BrowserInterface $browser)
 {
     parent::__construct($element, $blockFactory, $mapper, $browser);
     $this->waitPopupToLoad();
 }
Пример #23
0
 /**
  * Fill the root form.
  *
  * @param FixtureInterface $customer
  * @param Element|null $element
  * @return $this
  */
 public function fill(FixtureInterface $customer, Element $element = null)
 {
     $element = $this->switchOnPayPalFrame($element);
     $this->waitForElementNotVisible($this->loader);
     return parent::fill($customer, $element);
 }
Пример #24
0
 /**
  * Apply gift card account.
  *
  * @param GiftCardAccount $giftCardAccount
  * @return void
  */
 public function applyGiftCardAccount(GiftCardAccount $giftCardAccount)
 {
     parent::fill($giftCardAccount);
     $this->_rootElement->find($this->addGiftCardButton)->click();
     $this->getTemplateBlock()->waitLoader();
 }
 /**
  * Fill the page form.
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     return parent::fill($fixture, $element);
 }
Пример #26
0
 /**
  * @constructor
  * @param SimpleElement $element
  * @param Mapper $mapper
  * @param BlockFactory $blockFactory
  * @param BrowserInterface $browser
  * @param array $config
  */
 public function __construct(SimpleElement $element, Mapper $mapper, BlockFactory $blockFactory, BrowserInterface $browser, array $config = [])
 {
     parent::__construct($element, $blockFactory, $mapper, $browser, $config);
 }
 /**
  * Fill the root form
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $element = $this->_rootElement->find(sprintf($this->currencyRow, $fixture->getCode()), Locator::SELECTOR_XPATH);
     return parent::fill($fixture, $element);
 }
Пример #28
0
 /**
  * @constructor
  * @param Element $element
  * @param Mapper $mapper
  * @param BlockFactory $blockFactory
  * @param Browser $browser
  * @param XmlConverter $xmlConverter
  * @param array $config
  */
 public function __construct(Element $element, Mapper $mapper, BlockFactory $blockFactory, Browser $browser, XmlConverter $xmlConverter, array $config = [])
 {
     $this->xmlConverter = $xmlConverter;
     parent::__construct($element, $blockFactory, $mapper, $browser, $config);
 }