/** * @Then I should see the product :productName with price :productPrice */ public function iShouldSeeTheProductWithPrice($productName, $productPrice) { Assert::true($this->taxonShowPage->isProductWithPriceOnList($productName, $productPrice), sprintf("The product %s with price %s should appear on page, but it does not.", $productName, $productPrice)); }
/** * @Then the first product on the list should have name :name */ public function theFirstProductOnTheListShouldHaveName($name) { $actualName = $this->taxonShowPage->getFirstProductNameFromList(); Assert::same($actualName, $name, sprintf('Expected first product\'s name to be "%s", but it is "%s".', $name, $actualName)); }
/** * @Then they should have order like :firstProductName, :secondProductName and :thirdProductName */ public function theyShouldHaveOrderLikeAnd(...$productNames) { Assert::true($this->taxonShowPage->hasProductsInOrder($productNames), 'The products have wrong order.'); }