/** * @Then I should see :numberOfProductVariants variants in the list * @Then I should see :numberOfProductVariants variant in the list */ public function iShouldSeeProductsInTheList($numberOfProductVariants) { $foundRows = $this->indexPage->countItems(); Assert::same($numberOfProductVariants, $foundRows, '%s rows with product variants should appear on page, %s rows has been found'); }
/** * @param ProductInterface $product * @param int $amount */ private function assertNumberOfVariantsOnProductPage(ProductInterface $product, $amount) { $this->iWantToViewAllVariantsOfThisProduct($product); Assert::same((int) $this->indexPage->countItems(), $amount, 'Product has %d variants, but should have %d'); }