Example #1
0
 /**
  * {@inheritdoc}
  */
 public function addToCartWithOption(OptionInterface $option, $optionValue)
 {
     $select = $this->getDocument()->find('css', sprintf('select#sylius_cart_item_variant_%s', $option->getCode()));
     $this->getDocument()->selectFieldOption($select->getAttribute('name'), $optionValue);
     $this->getDocument()->pressButton('Add to cart');
 }
 /**
  * @Then /^(this product option) should still be named "([^"]+)"$/
  * @Then /^(this product option) name should be "([^"]+)"$/
  */
 public function thisProductOptionNameShouldStillBe(OptionInterface $productOption, $productOptionName)
 {
     $this->iBrowseProductOptions();
     Assert::true($this->indexPage->isSingleResourceOnPage(['code' => $productOption->getCode(), 'name' => $productOptionName]), sprintf('Product option name %s has not been assigned properly.', $productOptionName));
 }