10 use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
11 use Magento\Catalog\Test\Page\Product\CatalogProductView;
12 use Magento\Checkout\Test\Page\CheckoutCart;
13 use Magento\Cms\Test\Page\CmsIndex;
14 use Magento\Mtf\Constraint\AbstractConstraint;
15 use Magento\Mtf\Fixture\FixtureInterface;
57 abstract protected function assert($actualPrices);
84 $this->
assert($actualPrices);
102 $this->catalogCategoryView->getListProductBlock()->getProductItem(
$product)->open();
103 $actualPrices = $this->
addToCart($product, $actualPrices);
104 $actualPrices = $this->
getCartPrice($product, $actualPrices);
119 $this->cmsIndex->open();
120 $this->cmsIndex->getTopmenu()->selectCategoryByName(
$product->getCategoryIds()[0]);
132 $actualPrices[
'category_price_incl_tax'] =
133 $this->catalogCategoryView
134 ->getListProductBlock()
137 ->getPriceIncludingTax();
138 return $actualPrices;
150 $this->catalogProductView->getViewBlock()->fillOptions(
$product);
151 $actualPrices[
'product_page_price'] =
152 $this->catalogProductView->getViewBlock()->getPriceBlock()->getPrice();
153 $this->catalogProductView->getViewBlock()->clickAddToCart();
154 $this->catalogProductView->getMessagesBlock()->waitSuccessMessage();
155 return $actualPrices;
167 $this->checkoutCart->open();
168 $actualPrices[
'cart_item_price_incl_tax'] =
169 $this->checkoutCart->getCartBlock()->getCartItem(
$product)->getPriceInclTax();
170 $actualPrices[
'cart_item_subtotal_incl_tax'] =
171 $this->checkoutCart->getCartBlock()->getCartItem(
$product)->getSubtotalPriceInclTax();
172 $actualPrices[
'grand_total'] =
173 $this->checkoutCart->getTotalsBlock()->getGrandTotalIncludingTax();
174 return $actualPrices;
185 $this->objectManager->create(
186 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
198 $this->checkoutCart->open();
199 $this->checkoutCart->getCartBlock()->clearShoppingCart();
getCategoryPrice(FixtureInterface $product, $actualPrices)
getPricesForCustomers(CatalogProductSimple $product, $customers)
processAssert(CatalogProductSimple $product, CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, array $customers)
openCategory(CatalogProductSimple $product)
getCartPrice(CatalogProductSimple $product, $actualPrices)
addToCart(CatalogProductSimple $product, $actualPrices)