Exemplo n.º 1
0
 /**
  * Fill attribute options
  *
  * @param FixtureInterface $fixture
  */
 protected function fillOptions(FixtureInterface $fixture)
 {
     /** @var $fixture \Magento\Catalog\Test\Fixture\ProductAttribute */
     $options = $fixture->getOptions();
     $row = 1;
     foreach ($options as $option) {
         $this->_rootElement->find($this->addNewOption)->click();
         // TODO: implement filling for any number of stores
         $this->_rootElement->find(str_replace('%row%', $row, $this->optionRow) . '/td[2]/input', Element\Locator::SELECTOR_XPATH, 'checkbox')->setValue($option['default']['value']);
         $this->_rootElement->find(str_replace('%row%', $row, $this->optionRow) . '/td[3]/input', Element\Locator::SELECTOR_XPATH)->setValue($option['label']['value']);
         ++$row;
     }
 }