9 use Magento\Checkout\Test\Page\CheckoutOnepage;
11 use Magento\Mtf\Constraint\AbstractConstraint;
34 CheckoutOnepage $checkoutOnepage,
41 $this->objectManager->create(
42 \
Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
45 $this->objectManager->create(
46 \
Magento\Checkout\Test\TestStep\AddProductsToTheCartStep::class,
49 $this->objectManager->create(\
Magento\Checkout\Test\TestStep\ProceedToCheckoutStep::class)->run();
50 $this->objectManager->create(
51 \
Magento\Checkout\Test\TestStep\FillBillingInformationStep::class,
52 [
'customer' =>
$customer,
'checkoutMethod' =>
'register']
54 $this->objectManager->create(
55 \
Magento\Checkout\Test\TestStep\FillShippingMethodStep::class,
56 [
'shipping' => $shipping]
58 $this->objectManager->create(
59 \
Magento\Checkout\Test\TestStep\SelectPaymentMethodStep::class,
62 $actualPrices[
'grand_total'] = $checkoutOnepage->getReviewBlock()->getGrandTotal();
63 $actualPrices[
'sub_total'] = $checkoutOnepage->getReviewBlock()->getSubtotal();
64 $expectedPrices[
'grand_total'] = $cartPrice[
'grand_total'];
65 $expectedPrices[
'sub_total'] = $cartPrice[
'sub_total'];
66 \PHPUnit\Framework\Assert::assertEquals(
69 'Wrong total cart prices are displayed.' 70 .
"\nExpected: " . implode(PHP_EOL, $expectedPrices)
71 .
"\nActual: " . implode(PHP_EOL, $actualPrices) .
"\n" 82 return 'Displayed catalog price rule data on OnePage Checkout equals to passed from fixture.';
processAssert(CheckoutOnepage $checkoutOnepage, Customer $customer, array $products, array $cartPrice, array $shipping, array $payment)