Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DeleteCustomerBackendEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
11 use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
12 use Magento\Mtf\TestCase\Injectable;
13 
31 class DeleteCustomerBackendEntityTest extends Injectable
32 {
33  /* tags */
34  const MVP = 'yes';
35  /* end tags */
36 
40  protected $customerIndexPage;
41 
46 
54  public function __inject(CustomerIndex $customerIndexPage, CustomerIndexEdit $customerIndexEditPage)
55  {
56  $this->customerIndexPage = $customerIndexPage;
57  $this->customerIndexEditPage = $customerIndexEditPage;
58  }
59 
66  public function testDeleteCustomerBackendEntity(Customer $customer)
67  {
68  // Preconditions:
69  $customer->persist();
70 
71  // Steps:
72  $filter = ['email' => $customer->getEmail()];
73  $this->customerIndexPage->open();
74  $this->customerIndexPage->getCustomerGridBlock()->searchAndOpen($filter);
75  $this->customerIndexEditPage->getPageActionsBlock()->delete();
76  $this->customerIndexEditPage->getModalBlock()->acceptAlert();
77  }
78 }
$customer
Definition: customers.php:11
__inject(CustomerIndex $customerIndexPage, CustomerIndexEdit $customerIndexEditPage)