Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertRoleNotInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\User\Test\Page\Adminhtml\UserRoleIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertRoleNotInGrid extends AbstractConstraint
17 {
25  public function processAssert(
26  UserRoleIndex $rolePage,
27  Role $role
28  ) {
29  $filter = ['rolename' => $role->getRoleName()];
30  $rolePage->open();
31  \PHPUnit\Framework\Assert::assertFalse(
32  $rolePage->getRoleGrid()->isRowVisible($filter),
33  'Role with name \'' . $role->getRoleName() . '\' is present in Roles grid.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Role is absent in Roles grid.';
45  }
46 }
processAssert(UserRoleIndex $rolePage, Role $role)