/** * @Given I have :product with :productOption :productOptionValue in the cart * @When I add :product with :productOption :productOptionValue to the cart */ public function iAddThisProductWithToTheCart(ProductInterface $product, ProductOptionInterface $productOption, $productOptionValue) { $this->productShowPage->open(['slug' => $product->getSlug()]); $this->productShowPage->addToCartWithOption($productOption, $productOptionValue); }
/** * @When /^I check (this product)'s details/ * @When I view product :product */ public function iOpenProductPage(ProductInterface $product) { $this->showPage->open(['slug' => $product->getSlug()]); }
/** * @Given I have :quantity products :product in the cart * @When I add :quantity products :product to the cart */ public function iAddProductsToTheCart(ProductInterface $product, $quantity) { $this->productShowPage->open(['product' => $product]); $this->productShowPage->addToCartWithQuantity($quantity); $this->sharedStorage->set('product', $product); }