Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderGraphImageIsVisible.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\Mtf\TestStep\TestStepFactory;
11 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
12 
16 class AssertOrderGraphImageIsVisible extends AbstractConstraint
17 {
26  public function processAssert(
27  TestStepFactory $stepFactory,
28  Dashboard $dashboard,
29  array $argumentsList
30  ) {
31  $stepFactory->create(
32  \Magento\Backend\Test\TestStep\GetDashboardOrderStep::class,
33  ['argumentsList' => $argumentsList]
34  )->run();
35 
36  \PHPUnit\Framework\Assert::assertTrue(
37  $dashboard->getMainBlock()->isGraphImageVisible(),
38  'Graph image is not visible on admin dashboard.'
39  );
40  }
41 
47  public function toString()
48  {
49  return 'Order graph image is visible on the dashboard.';
50  }
51 }
processAssert(TestStepFactory $stepFactory, Dashboard $dashboard, array $argumentsList)