Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CheckoutWithPaypalFromCartStep.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\TestStep\TestStepInterface;
9 use Magento\Checkout\Test\Page\CheckoutCart;
10 
14 class CheckoutWithPaypalFromCartStep implements TestStepInterface
15 {
21  protected $checkoutCart;
22 
28  {
29  $this->checkoutCart = $checkoutCart;
30  }
31 
37  public function run()
38  {
39  $this->checkoutCart->open();
40  $this->checkoutCart->getTotalsBlock()->waitForShippingPriceBlock();
41  $this->checkoutCart->getTotalsBlock()->waitForUpdatedTotals();
42  $currentWindow = $this->checkoutCart->getCartBlock()
43  ->braintreePaypalCheckout();
44  $this->checkoutCart->getBraintreePaypalBlock()->process($currentWindow);
45  }
46 }