Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AcceptPaymentStep.php
Go to the documentation of this file.
1 <?php
7 
9 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
10 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
11 use Magento\Mtf\TestStep\TestStepInterface;
12 
16 class AcceptPaymentStep implements TestStepInterface
17 {
21  private $orderIndex;
22 
26  private $salesOrderView;
27 
31  private $order;
32 
33  public function __construct(OrderIndex $orderIndex, SalesOrderView $salesOrderView, OrderInjectable $order)
34  {
35  $this->orderIndex = $orderIndex;
36  $this->salesOrderView = $salesOrderView;
37  $this->order = $order;
38  }
39 
43  public function run()
44  {
45  $this->orderIndex->open();
46  $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]);
47  $this->salesOrderView->getPageActions()->accept();
48  }
49 }
$order
Definition: order.php:55
__construct(OrderIndex $orderIndex, SalesOrderView $salesOrderView, OrderInjectable $order)