Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertCustomerGroupInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerGroupIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertCustomerGroupInGrid extends AbstractConstraint
17 {
18  /* tags */
19  const SEVERITY = 'low';
20  /* end tags */
21 
29  public function processAssert(
30  CustomerGroup $customerGroup,
31  CustomerGroupIndex $customerGroupIndex
32  ) {
33  $customerGroupIndex->open();
34  $filter = ['code' => $customerGroup->getCustomerGroupCode()];
35  \PHPUnit\Framework\Assert::assertTrue(
36  $customerGroupIndex->getCustomerGroupGrid()->isRowVisible($filter),
37  'Group with type \'' . $customerGroup->getCustomerGroupCode() . '\'is absent in customer groups grid.'
38  );
39  }
40 
46  public function toString()
47  {
48  return 'Customer group in grid.';
49  }
50 }
processAssert(CustomerGroup $customerGroup, CustomerGroupIndex $customerGroupIndex)