Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerBackendBackButton.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
11 use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
12 
16 class AssertCustomerBackendBackButton extends AbstractConstraint
17 {
25  public function processAssert(CustomerIndexEdit $customerEditPage, CustomerIndex $customerGridPage)
26  {
27  $customerEditPage->getPageActionsBlock()->back();
28  \PHPUnit\Framework\Assert::assertTrue(
29  $customerGridPage->getCustomerGridBlock()->isVisible(),
30  'Clicking on "Back" button does not redirect to customers grid.'
31  );
32  }
33 
39  public function toString()
40  {
41  return '"Back" button on customer edit page redirects to customers grid.';
42  }
43 }
processAssert(CustomerIndexEdit $customerEditPage, CustomerIndex $customerGridPage)