/** * @When /^I (?:|want to )view all variants of (this product)$/ * @When /^I view(?:| all) variants of the (product "[^"]+")$/ */ public function iWantToViewAllVariantsOfThisProduct(ProductInterface $product) { $this->indexPage->open(['productId' => $product->getId()]); }
/** * @Then the :variant variant of :product product should have :amount items on hold */ public function theVariantOfProductShouldHaveItemsOnHold(ProductVariantInterface $variant, ProductInterface $product, $amount) { $this->indexPage->open(['productId' => $product->getId()]); Assert::same($amount, $this->indexPage->getOnHoldQuantityFor($variant), sprintf('Unexpected on hold quantity for "%s" variant. It should be "%s" but is "%s"', $variant->getName(), $amount, $this->indexPage->getOnHandQuantityFor($variant))); }
/** * @Then the :variant variant of :product product should have :amount items on hold */ public function theVariantOfProductShouldHaveItemsOnHold(ProductVariantInterface $variant, ProductInterface $product, $amount) { $this->indexPage->open(['productId' => $product->getId()]); $this->assertOnHoldQuantityOfVariant((int) $amount, $variant); }