Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NewAccountsReportEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
11 use Magento\Reports\Test\Page\Adminhtml\CustomerAccounts;
12 use Magento\Mtf\TestCase\Injectable;
13 
29 class NewAccountsReportEntityTest extends Injectable
30 {
31  /* tags */
32  const MVP = 'no';
33  /* end tags */
34 
40  protected $customerAccounts;
41 
47  protected $customerIndexPage;
48 
56  public function __inject(CustomerIndex $customerIndexPage, CustomerAccounts $customerAccounts)
57  {
58  $this->customerAccounts = $customerAccounts;
59  $this->customerIndexPage = $customerIndexPage;
60  }
61 
69  public function test(Customer $customer, array $customersReport)
70  {
71  // Preconditions
72  $this->customerIndexPage->open();
73  $this->customerIndexPage->getCustomerGridBlock()->massaction([], 'Delete', true, 'Select All');
74  $customer->persist();
75 
76  // Steps
77  $this->customerAccounts->open();
78  $this->customerAccounts->getGridBlock()->searchAccounts($customersReport);
79  }
80 }
$customer
Definition: customers.php:11
__inject(CustomerIndex $customerIndexPage, CustomerAccounts $customerAccounts)