Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\User\Test\Page\Adminhtml\UserIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertUserInGrid extends AbstractConstraint
17 {
25  public function processAssert(UserIndex $userIndex, User $user)
26  {
27  $filter = ['username' => $user->getUsername()];
28 
29  $userIndex->open();
30  \PHPUnit\Framework\Assert::assertTrue(
31  $userIndex->getUserGrid()->isRowVisible($filter),
32  'User with name \'' . $user->getUsername() . '\' is absent in User grid.'
33  );
34  }
35 
41  public function toString()
42  {
43  return 'User is present in Users grid.';
44  }
45 }
processAssert(UserIndex $userIndex, User $user)
$user
Definition: dummy_user.php:13