/**
  * Sales coupon report
  *
  * @param OrderInjectable $order
  * @param array $viewsReport
  * @return void
  */
 public function test(OrderInjectable $order, array $viewsReport)
 {
     // Precondition
     $order->persist();
     $this->orderIndex->open();
     $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]);
     $this->orderView->getPageActions()->invoice();
     $this->orderInvoiceNew->getTotalsBlock()->submit();
     $this->reportStatistic->open();
     $this->reportStatistic->getGridBlock()->massaction([['report' => 'Coupons']], 'Refresh Statistics for the Last Day', true);
     // Steps
     $this->salesCouponReportView->open();
     $ruleName = $order->getCouponCode()->getName();
     $viewsReport['rules_list'] = str_replace('%rule_name%', $ruleName, $viewsReport['rules_list']);
     $this->salesCouponReportView->getFilterBlock()->viewsReport($viewsReport);
     $this->salesCouponReportView->getActionBlock()->showReport();
 }