Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserPermissionsOnlyConfigurationIndexPage.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
11 use Magento\Config\Test\Page\Adminhtml\ConfigIndex;
12 use Magento\Mtf\Constraint\AbstractConstraint;
14 
19 class AssertUserPermissionsOnlyConfigurationIndexPage extends AbstractConstraint
20 {
29  public function processAssert(
30  ConfigIndex $configIndex,
31  Dashboard $dashboard,
32  AdminAuthLogin $adminAuth,
33  User $customAdmin
34  ) {
35  $dashboard->getAdminPanelHeader()->logOut();
36  $adminAuth->open();
37  $adminAuth->getLoginBlock()->fill($customAdmin);
38  $adminAuth->getLoginBlock()->submit();
39  $configIndex->open();
40  \PHPUnit\Framework\Assert::assertTrue(
41  $configIndex->getAdminForm()->isEmpty(),
42  "Form isn't empty."
43  );
44  }
45 
51  public function toString()
52  {
53  return 'Form is empty.';
54  }
55 }
processAssert(ConfigIndex $configIndex, Dashboard $dashboard, AdminAuthLogin $adminAuth, User $customAdmin)