/** * @Given I want to review product :product */ public function iWantToReviewProduct(ProductInterface $product) { $this->createPage->open(['slug' => $product->getSlug()]); }
/** * @Then I should be on :product product detailed page */ public function iShouldBeOnProductDetailedPage(ProductInterface $product) { Assert::true($this->showPage->isOpen(['slug' => $product->getSlug()]), sprintf('Product %s show page should be open, but it does not.', $product->getName())); }
/** * @Then /^average rating of (product "[^"]+") should be (\d+)$/ */ public function thisProductAverageRatingShouldBe(ProductInterface $product, $averageRating) { $this->showPage->tryToOpen(['slug' => $product->getSlug()]); $this->iShouldSeeAsItsAverageRating($averageRating); }
/** * @When /^I check (this product)'s reviews$/ */ public function iCheckThisProductSReviews(ProductInterface $product) { $this->productReviewsIndexPage->open(['slug' => $product->getSlug()]); }