Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
GetDashboardOrderStep.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\TestStep\TestStepInterface;
10 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
11 
15 class GetDashboardOrderStep implements TestStepInterface
16 {
22  private $dashboard;
23 
29  private $argumentsList;
30 
35  public function __construct(
36  Dashboard $dashboard,
37  array $argumentsList = []
38  ) {
39  $this->dashboard = $dashboard;
40  $this->argumentsList = $argumentsList;
41  }
42 
48  public function run()
49  {
50  $dashboardOrder = [];
51  if (isset($this->argumentsList)) {
52  $this->dashboard->open();
53  $dashboardOrder = $this->dashboard->getMainBlock()->getDashboardOrder($this->argumentsList);
54  }
55  return ['dashboardOrder' => $dashboardOrder];
56  }
57 }
__construct(Dashboard $dashboard, array $argumentsList=[])