9 use Magento\Cms\Test\Page\CmsIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Checkout\Test\Page\CheckoutCart;
12 use Magento\Checkout\Test\Page\CheckoutOnepage;
13 use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
15 use Magento\Sales\Test\Page\CustomerOrderView;
16 use Magento\Mtf\Fixture\InjectableFixture;
77 CheckoutOnepageSuccess $checkoutOnepageSuccess,
84 $checkoutCart->getProceedToCheckoutBlock()->proceedToCheckout();
85 $cmsIndex->getCmsPageBlock()->waitPageInit();
87 $shippingMethod = [
'shipping_service' =>
'Flat Rate',
'shipping_method' =>
'Fixed'];
90 $checkoutOnepage->getPaymentBlock()->selectPaymentMethod([
'method' =>
'checkmo']);
96 $message =
'Prices on order review should be equal to defined in dataset.';
97 \PHPUnit\Framework\Assert::assertEquals(
98 array_diff_key(
$prices, [
'cart_item_price_excl_tax' =>
null,
'cart_item_price_incl_tax' =>
null]),
99 array_diff_key($actualPrices, [
'cart_item_price_excl_tax' =>
null,
'cart_item_price_incl_tax' =>
null]),
104 $checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
105 $checkoutOnepageSuccess->getSuccessBlock()->openOrder();
111 $message =
'Prices on order view page should be equal to defined in dataset.';
112 \PHPUnit\Framework\Assert::assertEquals(
$prices, $actualPrices,
$message);
123 return array_diff_key(
127 'category_special_price',
128 'category_price_excl_tax',
129 'category_price_incl_tax',
130 'product_view_price',
131 'product_view_special_price',
132 'product_view_price_excl_tax',
133 'product_view_price_incl_tax' 147 $reviewBlock = $this->checkoutOnepage->getReviewBlock();
148 $actualPrices[
'cart_item_price_excl_tax'] = $reviewBlock->getItemPriceExclTax(
$product->getName());
149 $actualPrices[
'cart_item_price_incl_tax'] = $reviewBlock->getItemPriceInclTax(
$product->getName());
150 $actualPrices[
'cart_item_subtotal_excl_tax'] = $reviewBlock->getItemSubExclTax(
$product->getName());
151 $actualPrices[
'cart_item_subtotal_incl_tax'] = $reviewBlock->getItemSubInclTax(
$product->getName());
152 return $actualPrices;
164 $viewBlock = $this->customerOrderView->getOrderViewBlock();
165 $actualPrices[
'cart_item_price_excl_tax'] = $viewBlock->getItemPriceExclTax(
$product->getName());
166 $actualPrices[
'cart_item_price_incl_tax'] = $viewBlock->getItemPriceInclTax(
$product->getName());
167 $actualPrices[
'cart_item_subtotal_excl_tax'] = $viewBlock->getItemSubExclTax(
$product->getName());
168 $actualPrices[
'cart_item_subtotal_incl_tax'] = $viewBlock->getItemSubInclTax(
$product->getName());
169 return $actualPrices;
179 return 'Prices on front after order creation is correct.';
getReviewTotals($actualPrices)
getOrderTotals($actualPrices)
processAssert(array $prices, InjectableFixture $product, CheckoutCart $checkoutCart, CheckoutOnepage $checkoutOnepage, CheckoutOnepageSuccess $checkoutOnepageSuccess, CustomerOrderView $customerOrderView, CmsIndex $cmsIndex)
getOrderPrices($actualPrices, InjectableFixture $product)
getReviewPrices($actualPrices, InjectableFixture $product)